WebKit should remove unused debug variant support
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Nov 2020 21:17:51 +0000 (21:17 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Nov 2020 21:17:51 +0000 (21:17 +0000)
commit1643c280ea129401a87b3c616e39e27bae5ebf00
tree67cbe05f9e67e1a2ed612015b3b9076034922bc9
parentbbfbe0ba24f97c9945e92417df2c0d5dfa8250d1
WebKit should remove unused debug variant support
<https://webkit.org/b/218315>
<rdar://problem/70785369>

Reviewed by Darin Adler.

Remove support for building the debug variant since it is
currently unused. We now set default values for the
DEAD_CODE_STRIPPING, DEBUG_DEFINES, GCC_OPTIMIZATION_LEVEL and
STRIP_INSTALLED_PRODUCT variables.

Also move these values out of the Xcode project into
Base.xcconfig files using the [config=Debug] specifier so that
these overrides are next to the definitions.

Source/bmalloc:

* Configurations/Base.xcconfig:
* bmalloc.xcodeproj/project.pbxproj:

Source/JavaScriptCore:

* Configurations/Base.xcconfig:
* JavaScriptCore.xcodeproj/project.pbxproj:

Source/ThirdParty/ANGLE:

Additional changes in behavior are noted below.

* Configurations/ANGLE-dynamic.xcconfig:
- Move DEBUG_DEFINES to Base.xcconfig.
- Set up DEAD_CODE_STRIPPING and STRIP_INSTALLED_PRODUCT the
  same as for other WebKit projects. Previously dead code and
  symbols were never stipped in Release or Production builds.

* Configurations/ANGLE-static.xcconfig:
- Move DEBUG_DEFINES to Base.xcconfig.

* Configurations/Base.xcconfig:
- Set up DEBUG_DEFINES and GCC_OPTIMIZATION_LEVEL the same as
  other WebKit projects. Previously Debug builds were built with
  -Os instead of -O0.

Source/ThirdParty/libwebrtc:

Additional changes in behavior are noted below.

* Configurations/Base.xcconfig:
- Add missing copyright block.
- Set up DEBUG_DEFINES and GCC_OPTIMIZATION_LEVEL the same as
  other WebKit projects.

* Configurations/DebugRelease.xcconfig:
- Add missing copyright block.
- Move DEBUG_DEFINES and GCC_OPTIMIZATION_LEVEL to Base.xcconfig
  for [config=Debug].

* Configurations/libwebrtc.xcconfig:
- Add missing copyright block.
- Set up STRIP_INSTALLED_PRODUCT the same as for other WebKit
  projects.  Previously symbols were never stripped in Release
  or Production builds.

* Configurations/yasm.xcconfig:
- Add missing copyright block.
(GCC_PREPROCESSOR_DEFINITIONS):
- Add $(DEBUG_DEFINES) so yasm builds with -DNDEBUG in Release
  and Production configurations.

* libwebrtc.xcodeproj/project.pbxproj:
- Remove unneeded PRODUCT_NAME variables.

Source/WebCore:

* Configurations/Base.xcconfig:
* WebCore.xcodeproj/project.pbxproj:

Source/WebCore/PAL:

* Configurations/Base.xcconfig:
* PAL.xcodeproj/project.pbxproj:

Source/WebInspectorUI:

Additional changes in behavior are noted below.

* Configurations/Base.xcconfig:
- Set up DEAD_CODE_STRIPPING, DEBUG_DEFINES,
  GCC_OPTIMIZATION_LEVEL and STRIP_INSTALLED_PRODUCT the same
  as other WebKit projects. Previously dead code was always
  stripped in Debug builds. Previously symbols were never
  stripped in Release or Production builds. Previously Debug
  builds were built with -Os instead of -O0.

* WebInspectorUI.xcodeproj/project.pbxproj:
- Move DEBUG_DEFINES to Base.xcconfig.

Source/WebKit:

Additional changes in behavior are noted below.

* Configurations/Base.xcconfig:
* WebKit.xcodeproj/project.pbxproj:
- STRIP_INSTALLED_PRODUCT is now set to NO for Debug builds.
  Previously symbols were always stripped in Debug builds.

Source/WebKitLegacy:

Additional changes in behavior are noted below.

* WebKitLegacy.xcodeproj/project.pbxproj:
- Move DEBUG_DEFINES to mac/Configurations/Base.xcconfig.
- Remove useless OTHER_LDFLAGS definitions.
- Remove unneeded BUILD_VARIANTS definition.

Source/WebKitLegacy/mac:

Additional changes in behavior are noted below.

* Configurations/Base.xcconfig:
* Configurations/WebKitLegacy.xcconfig:
- Move definition of ENABLE_WEBKIT_UNSET_DYLD_FRAMEWORK_PATH
  in DEBUG_DEFINES from the Xcode project to
  WebKitLegacy.xcconfig.

Source/WTF:

* Configurations/Base.xcconfig:
* WTF.xcodeproj/project.pbxproj:

Tools:

Additional changes in behavior are noted below.

* ContentExtensionTester/Configurations/Base.xcconfig:
* ContentExtensionTester/ContentExtensionTester.xcodeproj/project.pbxproj:

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
- Remove unneeded Xcode variables that have no effect or are
  already set in xcconfig files.
* DumpRenderTree/mac/Configurations/Base.xcconfig:

* ImageDiff/ImageDiff.xcodeproj/project.pbxproj:
- Remove redundant PRODUCT_NAME which is defined in
  ImageDiff.xcconfig.
- Let Xcode have its way with the project file.
* ImageDiff/cg/Configurations/Base.xcconfig:

* Scripts/check-for-exit-time-destructors:
* Scripts/check-for-global-initializers:
- Switch to use BUILD_VARIANTS instead of CURRENT_VARIANT. Xcode
  only invokes build phase scripts once (even when multiple
  variants are defined for a build), and it always sets
  CURRENT_VARIANT=normal, so using BUILD_VARIANTS is more
  accurate.
- Add FIXME about building with multiple variants. These scripts
  are only used in engineering builds, which are only ever built
  with BUILD_VARIANTS=normal, so there is no urgency to handle
  multiple variants here.

* Scripts/check-for-inappropriate-objc-class-names:
* Scripts/check-for-weak-vtables-and-externals:
- Remove unused $variants variable.

* TestWebKitAPI/Configurations/Base.xcconfig:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* WebKitTestRunner/Configurations/Base.xcconfig:
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:

* lldb/lldbWebKitTester/Configurations/Base.xcconfig:
* lldb/lldbWebKitTester/Configurations/lldbWebKitTester.xcconfig:
* lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj:
- Correctly define DEAD_CODE_STRIPPING, GCC_OPTIMIZATION_LEVEL
  and STRIP_INSTALLED_PRODUCT when buliding Debug configuration.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
54 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/Base.xcconfig
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/ThirdParty/ANGLE/ChangeLog
Source/ThirdParty/ANGLE/Configurations/ANGLE-dynamic.xcconfig
Source/ThirdParty/ANGLE/Configurations/ANGLE-static.xcconfig
Source/ThirdParty/ANGLE/Configurations/Base.xcconfig
Source/ThirdParty/libwebrtc/ChangeLog
Source/ThirdParty/libwebrtc/Configurations/Base.xcconfig
Source/ThirdParty/libwebrtc/Configurations/DebugRelease.xcconfig
Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig
Source/ThirdParty/libwebrtc/Configurations/yasm.xcconfig
Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj
Source/WTF/ChangeLog
Source/WTF/Configurations/Base.xcconfig
Source/WTF/WTF.xcodeproj/project.pbxproj
Source/WebCore/ChangeLog
Source/WebCore/Configurations/Base.xcconfig
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/Configurations/Base.xcconfig
Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Configurations/Base.xcconfig
Source/WebInspectorUI/WebInspectorUI.xcodeproj/project.pbxproj
Source/WebKit/ChangeLog
Source/WebKit/Configurations/Base.xcconfig
Source/WebKit/WebKit.xcodeproj/project.pbxproj
Source/WebKitLegacy/ChangeLog
Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Configurations/Base.xcconfig
Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig
Source/bmalloc/ChangeLog
Source/bmalloc/Configurations/Base.xcconfig
Source/bmalloc/bmalloc.xcodeproj/project.pbxproj
Tools/ChangeLog
Tools/ContentExtensionTester/Configurations/Base.xcconfig
Tools/ContentExtensionTester/ContentExtensionTester.xcodeproj/project.pbxproj
Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
Tools/DumpRenderTree/mac/Configurations/Base.xcconfig
Tools/ImageDiff/ImageDiff.xcodeproj/project.pbxproj
Tools/ImageDiff/cg/Configurations/Base.xcconfig
Tools/Scripts/check-for-exit-time-destructors
Tools/Scripts/check-for-global-initializers
Tools/Scripts/check-for-inappropriate-objc-class-names
Tools/Scripts/check-for-weak-vtables-and-externals
Tools/TestWebKitAPI/Configurations/Base.xcconfig
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/WebKitTestRunner/Configurations/Base.xcconfig
Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
Tools/lldb/lldbWebKitTester/Configurations/Base.xcconfig
Tools/lldb/lldbWebKitTester/Configurations/lldbWebKitTester.xcconfig
Tools/lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj