Ignore:
Timestamp:
Feb 7, 2020, 12:42:01 PM (5 years ago)
Author:
[email protected]
Message:

Move trivial definitions from FeatureDefines.xcconfig to PlatformEnableCocoa.h
https://bugs.webkit.org/show_bug.cgi?id=207155

Reviewed by Tim Horton.
Source/JavaScriptCore:


Move all trivial definitions (just ENABLE_FOO = ENABLE_FOO; or ENABLE_BAR = ;)
from the FeatureDefines.xcconfigs to PlatformEnableCocoa.h, ensuring each one
also has a default value in PlatformEnable.h

To support the move, DerivedSources.make has been updated to generate the list
of ENABLE_* features by directly from preprocessing Platform.h, rather than
just getting the partial list from the xcconfig file.

  • Configurations/FeatureDefines.xcconfig:
  • DerivedSources.make:

Source/WebCore:

Move all trivial definitions (just ENABLE_FOO = ENABLE_FOO; or ENABLE_BAR = ;)
from the FeatureDefines.xcconfigs to PlatformEnableCocoa.h, ensuring each one
also has a default value in PlatformEnable.h

To support the move, DerivedSources.make and generate-unified-sources.sh have been
updated to generate the list of ENABLE_* features by directly from preprocessing
Platform.h, rather than just getting the partial list from the xcconfig file.

  • Configurations/FeatureDefines.xcconfig:
  • Configurations/WebCore.xcconfig:
  • DerivedSources.make:
  • Scripts/generate-unified-sources.sh:

Source/WebCore/PAL:

Move all trivial definitions (just ENABLE_FOO = ENABLE_FOO; or ENABLE_BAR = ;)
from the FeatureDefines.xcconfigs to PlatformEnableCocoa.h, ensuring each one
also has a default value in PlatformEnable.h

  • Configurations/FeatureDefines.xcconfig:
  • Configurations/PAL.xcconfig:

Remove quotes as they should not be necessary (other uses of BUILT_PRODUCTS_DIR
are not quoted) and complicate scripts that want to use HEADER_SEARCH_PATHS.

Source/WebKit:

Move all trivial definitions (just ENABLE_FOO = ENABLE_FOO; or ENABLE_BAR = ;)
from the FeatureDefines.xcconfigs to PlatformEnableCocoa.h, ensuring each one
also has a default value in PlatformEnable.h

To support the move, DerivedSources.make and generate-unified-sources.sh have been
updated to generate the list of ENABLE_* features by directly from preprocessing
Platform.h, rather than just getting the partial list from the xcconfig file.

  • Configurations/FeatureDefines.xcconfig:
  • DerivedSources.make:
  • Scripts/generate-unified-sources.sh:

Source/WebKitLegacy:

To support the move, generate-unified-sources.sh has been updated to generate
the list of ENABLE_* features by directly from preprocessing Platform.h, rather
than just getting the partial list from the xcconfig file.

  • scripts/generate-unified-sources.sh:

Source/WebKitLegacy/mac:

Move all trivial definitions (just ENABLE_FOO = ENABLE_FOO; or ENABLE_BAR = ;)
from the FeatureDefines.xcconfigs to PlatformEnableCocoa.h, ensuring each one
also has a default value in PlatformEnable.h

To support the move, DerivedSources.make has been updated to generate the list
of ENABLE_* features by directly from preprocessing Platform.h, rather than
just getting the partial list from the xcconfig file.

  • Configurations/FeatureDefines.xcconfig:
  • MigrateHeaders.make:

Source/WTF:

Move all trivial definitions (just ENABLE_FOO = ENABLE_FOO; or ENABLE_BAR = ;)
from the FeatureDefines.xcconfigs to PlatformEnableCocoa.h, ensuring each one
also has a default value in PlatformEnable.h

ENABLE_INSPECTOR_TELEMETRY, ENABLE_TEXT_AUTOSIZING, ENABLE_WEBGL, ENABLE_METER_ELEMENT,
ENABLE_VIDEO_TRACK, ENABLE_WEB_AUDIO and ENABLE_CURSOR_VISIBILITY are all now always
set to 1 for Cocoa (if not defined already), as this was already the case via the xcconfig.

  • wtf/PlatformEnable.h:
  • wtf/PlatformEnableCocoa.h:

Tools:

Move all trivial definitions (just ENABLE_FOO = ENABLE_FOO; or ENABLE_BAR = ;)
from the FeatureDefines.xcconfigs to PlatformEnableCocoa.h, ensuring each one
also has a default value in PlatformEnable.h

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/DerivedSources.make

    r253335 r256051  
    265265#
    266266
    267 ifeq ($(findstring ENABLE_INDEXED_DATABASE,$(FEATURE_DEFINES)), ENABLE_INDEXED_DATABASE)
     267
     268FRAMEWORK_FLAGS = $(shell echo $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_SEARCH_PATHS) $(SYSTEM_FRAMEWORK_SEARCH_PATHS) | perl -e 'print "-F " . join(" -F ", split(" ", <>));')
     269HEADER_FLAGS = $(shell echo $(BUILT_PRODUCTS_DIR) $(HEADER_SEARCH_PATHS) $(SYSTEM_HEADER_SEARCH_PATHS) | perl -e 'print "-I" . join(" -I", split(" ", <>));')
     270
     271ifneq ($(SDKROOT),)
     272    SDK_FLAGS=-isysroot $(SDKROOT)
     273endif
     274
     275ifeq ($(USE_LLVM_TARGET_TRIPLES_FOR_CLANG),YES)
     276    WK_CURRENT_ARCH=$(word 1, $(ARCHS))
     277    TARGET_TRIPLE_FLAGS=-target $(WK_CURRENT_ARCH)-$(LLVM_TARGET_TRIPLE_VENDOR)-$(LLVM_TARGET_TRIPLE_OS_VERSION)$(LLVM_TARGET_TRIPLE_SUFFIX)
     278endif
     279
     280ENABLED_FEATURES = $(shell $(CC) -std=$(CLANG_CXX_LANGUAGE_STANDARD) -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(patsubst %, -D%, $(FEATURE_DEFINES)) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep '\#define ENABLE_.* 1' | cut -d' ' -f2)
     281
     282ifeq ($(findstring ENABLE_INDEXED_DATABASE,$(ENABLED_FEATURES)), ENABLE_INDEXED_DATABASE)
    268283    INSPECTOR_DOMAINS := $(INSPECTOR_DOMAINS) $(JavaScriptCore)/inspector/protocol/IndexedDB.json
    269284endif
    270285
    271 ifeq ($(findstring ENABLE_RESOURCE_USAGE,$(FEATURE_DEFINES)), ENABLE_RESOURCE_USAGE)
     286ifeq ($(findstring ENABLE_RESOURCE_USAGE,$(ENABLED_FEATURES)), ENABLE_RESOURCE_USAGE)
    272287    INSPECTOR_DOMAINS := $(INSPECTOR_DOMAINS) $(JavaScriptCore)/inspector/protocol/CPUProfiler.json
    273288    INSPECTOR_DOMAINS := $(INSPECTOR_DOMAINS) $(JavaScriptCore)/inspector/protocol/Memory.json
    274289endif
    275290
    276 ifeq ($(findstring ENABLE_SERVICE_WORKER,$(FEATURE_DEFINES)), ENABLE_SERVICE_WORKER)
     291ifeq ($(findstring ENABLE_SERVICE_WORKER,$(ENABLED_FEATURES)), ENABLE_SERVICE_WORKER)
    277292    INSPECTOR_DOMAINS := $(INSPECTOR_DOMAINS) $(JavaScriptCore)/inspector/protocol/ServiceWorker.json
    278293endif
Note: See TracChangeset for help on using the changeset viewer.