File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,10 +111,15 @@ grep -q 'schedule=detach-codegen\|schedule=two-phase\|schedule=none' "$ninja_fil
111111# that a second build is a no-op. A schedule whose depfile target is wrong looks
112112# exactly like success while recompiling everything — the symptom that cost the
113113# most to find — and a no-op is what exposes it.
114- before=$( find target -name ' *.o' -newer " $TMP /sched.txt" | wc -l)
114+ # The reference mark is taken AFTER the first build, not from its stdout
115+ # redirect: that file's mtime is when the shell opened it, which is before the
116+ # objects exist, so every object counted as "newer" and the comparison measured
117+ # nothing but timestamp ordering.
118+ sleep 1
119+ touch " $TMP /mark"
115120MCPP_BMI_SCHEDULE=on " $MCPP " build --release > /dev/null 2>&1
116- after =$( find target -name ' *.o' -newer " $TMP /sched.txt " | wc -l)
117- [ " $after " -eq " $before " ] \
118- || { echo " second build under schedule=on recompiled ( $before -> $after objects )" ; exit 1; }
121+ rebuilt =$( find target -name ' *.o' -newer " $TMP /mark " | wc -l)
122+ [ " $rebuilt " -eq 0 ] \
123+ || { echo " second build under schedule=on recompiled $rebuilt object(s )" ; exit 1; }
119124
120125echo " split schedule OK"
You can’t perform that action at this time.
0 commit comments