Closed Bug 853494 Opened 9 years ago Closed 5 years ago

both --disable-optimize and --enable-debug should imply --disable-icf


(Firefox Build System :: General, defect)

Not set


(Not tracked)



(Reporter: bjacob, Assigned: bjacob)



(1 file)

People use --disable-optimize to get debuggable builds.

--disable-icf is very important in this respect because without it, breakpoints are garbled.

Please make --disable-optimize imply --disable-icf.
This is one of the most frustrating aspects of debugging B2G. It's already cost me a lot of time as you find yourself wondering what you're doing in <insert random class here>::<insert random function here> when you haven't even instantiated <said random class> and waste a lot of time only to find out ICF messed something up.
Severity: normal → major
That also means that --disable-icf should be disabled not just by --disable-optimize, but also by something like --enable-debug. The idea is that on B2G, practically nobody is patient enough to use --disable-optimize (people only pass -O0 in specific dirs).
Summary: --disable-optimize does not imply --disable-icf → both --disable-optimize and --enable-debug should imply --disable-icf
I tried to fix this, but I'm running into an issue: the configure code that checks for --disable-icf and runs the test to verify that the linker supports the corresponding LDFLAGS, is not coming from

So I don't see a way to implement "let --disable-optimize and --enable-debug should imply --disable-icf". Halp!
Flags: needinfo?(mh+mozilla)
Move --enable-debug and --disable-optimize above MOZ_COMPILER_OPTS and set MOZ_DISABLE_ICF=1
Flags: needinfo?(mh+mozilla)
Thanks! This seems to be working here: is built with --icf=safe by default in debug builds, and no longer with this patch.

However, I am very scared by this patch moving sizable chunks of code by thousands of lines up in I have no confidence that this won't break things, e.g. if that code relies on state that changes in between these two distant places.
Attachment #746066 - Flags: review?(mh+mozilla)
Comment on attachment 746066 [details] [diff] [review]
both --disable-optimize and --enable-debug should imply --disable-icf

Review of attachment 746066 [details] [diff] [review]:

@@ +2622,5 @@
> +dnl =
> +dnl = Debugging Options
> +dnl =
> +dnl ========================================================
> +MOZ_ARG_HEADER(Debugging and Optimizations)

You can remove this, it doesn't do anything anyways, and is now inacurate.
Attachment #746066 - Flags: review?(mh+mozilla) → review+
Assignee: nobody → bjacob
Target Milestone: --- → mozilla23
Backed out because this apparently breaks everything!
This likely just needs a clobber.
"Just needs a clobber" made sense to me, until came along, built Mac debug with a clobber, and still crashed both the build during leaktests and all the tests. Linux debug also seems to have crashed during startupcache precompilation (which is before packaging, so it didn't get to run tests that also crashed).
And I retriggered a Mac build on your push after I set it to clobber, back when I thought it was a Mac-only problem, and that one was also exactly as busted as an unclobbered build+tests.
Ah... OK :-( Thanks for trying / for the information. Will look.
Benoit you should reland this.
By all means, I wouldn't deprive you of that pleasure. Also, I'm off most tomorrow and on Tuesday.
Benoit, did you ever look into what caused the bustage?
Flags: needinfo?(bjacob)
No, not carefully.
Flags: needinfo?(bjacob)
glandium: could you please triage this bug?
Flags: needinfo?(mh+mozilla)
This was essentially made moot by bug 904979.
Closed: 5 years ago
Flags: needinfo?(mh+mozilla)
Resolution: --- → WONTFIX
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.