Bug 139926 - Don't force -O1 for debug ASan builds
Summary: Don't force -O1 for debug ASan builds
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-23 16:58 PST by Alexey Proskuryakov
Modified: 2014-12-23 20:43 PST (History)
4 users (show)

See Also:


Attachments
proposed fix (1.36 KB, patch)
2014-12-23 16:59 PST, Alexey Proskuryakov
no flags Details | Formatted Diff | Diff
proposed fix (1.32 KB, patch)
2014-12-23 18:38 PST, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2014-12-23 16:58:17 PST
We can now build debug with ASan, and it's not helpful to enable optimizations.
Comment 1 Alexey Proskuryakov 2014-12-23 16:59:20 PST
Created attachment 243713 [details]
proposed fix
Comment 2 Mark Rowe (bdash) 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?
Comment 3 Alexey Proskuryakov 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;
Comment 4 Alexey Proskuryakov 2014-12-23 18:22:09 PST
Err, the normal variant value is of course 1 when I try this, not 3.
Comment 5 Alexey Proskuryakov 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?
Comment 6 Alexey Proskuryakov 2014-12-23 20:43:27 PST
Committed <http://trac.webkit.org/r177718>.