We can now build debug with ASan, and it's not helpful to enable optimizations.
Created attachment 243713 [details] proposed fix
Comment on attachment 243713 [details] proposed fix Is there a reason to set this via OTHER_CFLAGS rather than overriding GCC_OPTIMIZATION_LEVEL?
The reason is that I didn't think of it. Now that I try it, I can't make it work. Replacing ASAN_OPTIMIZATION_LEVEL with the below, I get -O1 regardless of whether I do "make debug" or "make release". GCC_OPTIMIZATION_LEVEL = $(GCC_OPTIMIZATION_LEVEL_$(CURRENT_VARIANT)); GCC_OPTIMIZATION_LEVEL_normal = 3; GCC_OPTIMIZATION_LEVEL_debug = 0;
Err, the normal variant value is of course 1 when I try this, not 3.
Created attachment 243718 [details] proposed fix Perhaps as asan.xcconfig is evaluated globally, and variant is only defined by targets?
Committed <http://trac.webkit.org/r177718>.