File bugs here for general Firefox build system issues. This includes problems running `mach build`, `mach configure`, `mach package`, `mach artifact`, and other mach commands related to building Firefox. This component also tracks issues related to moz.build and make files.

Comment on attachment 8930362[details]Bug 1418052 Correctly process hardening flags for ASAN, --disable-hardening, and --disable-optimize
https://reviewboard.mozilla.org/r/201502/#review211754
::: build/moz.configure/toolchain.configure:1311
(Diff revision 5)
> + if hardening_flag.origin == "default" or hardening_flag:
> + # Require optimization for FORTIFY_SOURCE. See Bug 1417452
> + # Also, undefine it before defining it just in case a distro adds it, see Bug 1418398
> + if compiler_is_gccish and optimize and not asan:
> + # Don't enable FORTIFY_SOURCE on Android on the top-level, but do enable in js/
> + if not is_android:
you might as well use the condition directly... if target.os != 'Android':

My best guess is that the cause of this is because we are going from '-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2' for this job to just '-U_FORTIFY_SOURCE' - but I have no idea why that's a problem.
I'm going to try re-arranging the code and seeing if that makes the error go away...

If we remove -D_FORTIFY_SOURCE=2 from the Fuzzing ASAN build we get several linker errors like
INPUT("StaticXULComponentsEnd/StaticXULComponentsEnd.o")
../../image/Unified_cpp_image0.o: In function `mozilla::image::ISurfaceProvider::Surface()':
/builds/worker/workspace/build/src/image/ISurfaceProvider.h:228: undefined reference to `__sanitizer_cov_trace_pc_guard'
ISurfaceProvider::Surface() was specified in a .h, which while legal, made me suspect the
compiler/linker just couldn't get things straight. Moving it into its own .cpp file does
indeed help them figure it out.
It's one of those cases: I don't know why this makes the compiler happy, but it does.
Review commit: https://reviewboard.mozilla.org/r/212708/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/212708/

Okay the problem was actually that I my initial attempt at add_old_configure_assignment was incorrect: the function needs to be written to return True (not just the val) for the old-configure assignment to be set. Without MOZ_ASAN we weren't disabling the sandbox, leading to weird compilation errors.
glandium - could you review my change? If it looks good I will fold it into the original commit, do a full try run, and then checkin just a single patch.