WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
244540
[Xcode] Simplify sanitizer builds
https://bugs.webkit.org/show_bug.cgi?id=244540
Summary
[Xcode] Simplify sanitizer builds
David Kilzer (:ddkilzer)
Reported
2022-08-30 08:57:59 PDT
Simplify sanitizer builds when using Xcode. Instead of specifying a path to an xcconfig file from the Tools folder when building, use the ENABLE_*_SANITIZER Xcode variables to modify options during a build. This change is functionally equivalent to the old xcconfig files, except that WK_ASAN_DISALLOWED can't be used to disable ASan when building host-side tools. (Previously, the xcconfig files from Tools were the "layer" that turned on the ENABLE_*_SANITIZER macros, but this model assumes those macros are enabled in the `xcodebuild` command, which can't be overridden to my knowledge.) Also, in order to support overriding of the compiler optimization level, all GCC_OPTIMIZATION_LEVEL variables in Base.xcconfig files need to be changed to use GCC_OPTIMIZATION_LEVEL_OVERRIDE_NO instead, but a new style checker is introduced to remind folks when changing these variables. <
rdar://98015260
>
Attachments
Add attachment
proposed patch, testcase, etc.
David Kilzer (:ddkilzer)
Comment 1
2022-08-30 09:28:04 PDT
> This change is functionally equivalent to the old xcconfig files, except that WK_ASAN_DISALLOWED can't be used to disable ASan when building host-side tools. (Previously, the xcconfig files from Tools were the "layer" that turned on the ENABLE_*_SANITIZER macros, but this model assumes those macros are enabled in the `xcodebuild` command, which can't be overridden to my knowledge.)
I need to check how `-useAddressSanitization` differs from `ENABLE_ADDRESS_SANITIZER=YES` when used on the xcodebuild command-line. It may be possible that the former doesn't override variables in xcconfig files, in which case WK_ASAN_DISALLOWED=YES can just be replaced with ENABLE_ADDRESS_SANITIZER=NO in xcconfig files.
David Kilzer (:ddkilzer)
Comment 2
2022-08-30 09:31:36 PDT
I'm going to post an initial PR to get feedback, but I also still need to investigate
Comment #1
and write two unit tests for the new BaseXcconfigChecker.
David Kilzer (:ddkilzer)
Comment 3
2022-08-30 09:31:48 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/3811
David Kilzer (:ddkilzer)
Comment 4
2022-08-30 17:30:07 PDT
(In reply to David Kilzer (:ddkilzer) from
comment #1
)
> I need to check how `-useAddressSanitization` differs from > `ENABLE_ADDRESS_SANITIZER=YES` when used on the xcodebuild command-line.
Unfortunately, the `-useAddressSanitization` switch can't be used in this context.
David Kilzer (:ddkilzer)
Comment 5
2022-08-31 14:03:38 PDT
(In reply to David Kilzer (:ddkilzer) from
comment #2
)
> I'm going to post an initial PR to get feedback, but I also still need to > investigate
Comment #1
and write two unit tests for the new > BaseXcconfigChecker.
Added unit tests. Posting new PR in a few minutes.
David Kilzer (:ddkilzer)
Comment 6
2023-02-12 10:41:38 PST
New PR posted:
https://github.com/WebKit/WebKit/pull/3811
EWS
Comment 7
2023-02-21 21:30:32 PST
Committed
260654@main
(5ee7a204c4e9): <
https://commits.webkit.org/260654@main
> Reviewed commits have been landed. Closing PR #3811 and removing active labels.
David Kilzer (:ddkilzer)
Comment 8
2023-02-25 08:38:57 PST
This caused a test-webkitpy test failure under some circumstances:
Bug 252946
: REGRESSION (
260654@main
): BaseXcconfigCheckerTest fails when not run from top-level folder <
https://bugs.webkit.org/show_bug.cgi?id=252946
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug