RESOLVED FIXED 139926
Don't force -O1 for debug ASan builds
https://bugs.webkit.org/show_bug.cgi?id=139926
Summary Don't force -O1 for debug ASan builds
Alexey Proskuryakov
Reported 2014-12-23 16:58:17 PST
We can now build debug with ASan, and it's not helpful to enable optimizations.
Attachments
proposed fix (1.36 KB, patch)
2014-12-23 16:59 PST, Alexey Proskuryakov
no flags
proposed fix (1.32 KB, patch)
2014-12-23 18:38 PST, Alexey Proskuryakov
darin: review+
Alexey Proskuryakov
Comment 1 2014-12-23 16:59:20 PST
Created attachment 243713 [details] proposed fix
Mark Rowe (bdash)
Comment 2 2014-12-23 17:08:42 PST
Comment on attachment 243713 [details] proposed fix Is there a reason to set this via OTHER_CFLAGS rather than overriding GCC_OPTIMIZATION_LEVEL?
Alexey Proskuryakov
Comment 3 2014-12-23 18:18:47 PST
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;
Alexey Proskuryakov
Comment 4 2014-12-23 18:22:09 PST
Err, the normal variant value is of course 1 when I try this, not 3.
Alexey Proskuryakov
Comment 5 2014-12-23 18:38:07 PST
Created attachment 243718 [details] proposed fix Perhaps as asan.xcconfig is evaluated globally, and variant is only defined by targets?
Alexey Proskuryakov
Comment 6 2014-12-23 20:43:27 PST
Note You need to log in before you can comment on or make changes to this bug.