Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f16770926abc5eef3280e3715c7a7831ecf3fba7
https://github.com/WebKit/WebKit/commit/f16770926abc5eef3280e3715c7a7831ecf3fba7
Author: David Kilzer <[email protected]>
Date: 2026-08-24 (Mon, 24 Aug 2026)
Changed paths:
M Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig
M Source/JavaScriptCore/Configurations/TestExecutable.xcconfig
M Source/ThirdParty/ANGLE/Configurations/BaseTarget.xcconfig
M Source/ThirdParty/libwebrtc/Configurations/yasm.xcconfig
M Source/WTF/Configurations/WTF.xcconfig
M Source/bmalloc/Configurations/bmalloc.xcconfig
M Tools/DumpRenderTree/mac/Configurations/Base.xcconfig
M Tools/ImageDiff/cg/Configurations/Base.xcconfig
M Tools/Scripts/webkitpy/style/checkers/basexcconfig.py
M Tools/Scripts/webkitpy/style/checkers/basexcconfig_unittest.py
M Tools/WebKitTestRunner/Configurations/Base.xcconfig
Log Message:
-----------
Add missing inherited build settings that CommonBase.xcconfig sets
<https://bugs.webkit.org/show_bug.cgi?id=322273>
<rdar://185442781>
Unreviewed testing fix.
Several xcconfig files assign `GCC_PREPROCESSOR_DEFINITIONS` or
`SWIFT_ACTIVE_COMPILATION_CONDITIONS` without `$(inherited)`. Both
settings may also be set by `CommonBase.xcconfig`, so a target that
reassigns either one without `$(inherited)` silently discards the
value `CommonBase.xcconfig` contributes -- with no diagnostic, because
a missing definition produces no warning.
Add `$(inherited)` at every site that overrides one of these two
settings.
Add more checks to check-webkit-style to catch this sooner.
`BaseXcconfigChecker` only read `CommonBase.xcconfig` itself, so it did
not know about the settings `CommonBase.xcconfig` picks up from the
files it includes, and could not flag a clobbered
`SWIFT_ACTIVE_COMPILATION_CONDITIONS` at all. Read those files too,
taking only the settings they append to, since their other settings
are implementation details projects may legitimately override. Require
a standalone `$(inherited)` token, since a nested
`$(...:default=$(inherited))` is a fallback rather than an append.
Flag a hard-coded `$(WK_COMMON_<name>)` for a setting that has no such
variable, since `$(inherited)` is the only form that preserves the
inherited value there. Add
`basexcconfig/duplicate-commonbase-definitions` to flag a line that
lists both `$(inherited)` and `$(WK_COMMON_<name>)`, which repeats the
value `$(inherited)` already provides.
Splice `\` line continuations into one logical line before parsing, so
a continuation line that contains `=` (such as a preprocessor macro
value) is not misread as a separate assignment and does not produce a
false positive.
Have the checker tests supply the `CommonBase.xcconfig` variables
directly rather than reading them from disk, so they are self-contained
and do not depend on which settings the on-disk `CommonBase.xcconfig`
happens to define.
Tests: Add 6 tests to webkitpy/style/checkers/basexcconfig_unittest.py.
* Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig:
* Source/JavaScriptCore/Configurations/TestExecutable.xcconfig:
* Source/ThirdParty/ANGLE/Configurations/BaseTarget.xcconfig:
* Source/ThirdParty/libwebrtc/Configurations/yasm.xcconfig:
* Source/WTF/Configurations/WTF.xcconfig:
* Source/bmalloc/Configurations/bmalloc.xcconfig:
* Tools/DumpRenderTree/mac/Configurations/Base.xcconfig:
* Tools/ImageDiff/cg/Configurations/Base.xcconfig:
* Tools/WebKitTestRunner/Configurations/Base.xcconfig:
- Add missing `$(inherited)`.
* Tools/Scripts/webkitpy/style/checkers/basexcconfig.py:
(BaseXcconfigChecker.appends_to_inherited_value): Add.
(BaseXcconfigChecker.logical_lines): Add.
(BaseXcconfigChecker.assignments): Add.
(BaseXcconfigChecker.read_xcconfig_variables): Add.
(BaseXcconfigChecker.included_xcconfig_paths): Add.
(BaseXcconfigChecker.read_common_base_xcconfig_variables):
(BaseXcconfigChecker.check):
* Tools/Scripts/webkitpy/style/checkers/basexcconfig_unittest.py:
(BaseXcconfigCheckerTest.make_checker): Add.
(BaseXcconfigCheckerTest.assert_no_error):
(BaseXcconfigCheckerTest.assert_error):
(BaseXcconfigCheckerTest.test_gcc_preprocessor_definitions): Add.
(BaseXcconfigCheckerTest.test_swift_active_compilation_conditions): Add.
(BaseXcconfigCheckerTest.test_nested_inherited_is_not_an_append): Add.
(BaseXcconfigCheckerTest.test_duplicate_commonbase_definitions): Add.
(BaseXcconfigCheckerTest.test_line_continuation_is_not_a_separate_assignment):
Add.
(BaseXcconfigCheckerTest.test_read_xcconfig_variables_joins_line_continuations):
Add.
Originally-landed-as: 316606.432@safari-7625-branch (995bfdbc3a08).
rdar://185712704
Canonical link: https://commits.webkit.org/319740@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications