Title: [286018] trunk/Source
Revision
286018
Author
[email protected]
Date
2021-11-18 11:30:52 -0800 (Thu, 18 Nov 2021)

Log Message

Add missing dependencies for <wtf/Platform.h> when generating derived sources
<https://webkit.org/b/233304>
<rdar://problem/85533245>

Reviewed by Darin Adler.

Source/_javascript_Core:

* _javascript_Core.xcodeproj/project.pbxproj:
(Derived Sources : Generate Derived Sources):
- Add an input dependency on the script run from the build phase
  script.

* DerivedSources-input.xcfilelist:
- Update after changes to DerivedSoures.make.  WebKit headers
  included by <wtf/Platform.h> are now listed.
* DerivedSources.make:
(platform_h_compiler_command): Add.
(FEATURE_AND_PLATFORM_DEFINES):
- Extract compiler command into a call routine for reuse.
(PLATFORM_HEADER_DIR): Add.
(PLATFORM_HEADER_DEPENDENCIES): Add.
(FEATURE_AND_PLATFORM_DEFINE_DEPENDENCIES):
- Generate a makefile dependency list for <wtf/Platform.h>, then
  filter it to list only WebKit project headers.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
(Derived Sources : Generate Derived Sources):
- Add an input dependency on the script run from the build phase
  script.

* DerivedSources-input.xcfilelist:
- Update after changes to DerivedSoures.make.  WebKit headers
  included by <wtf/Platform.h> are now listed.
* DerivedSources.make:
(platform_h_compiler_command): Add.
(FEATURE_AND_PLATFORM_DEFINES):
- Extract compiler command into a call routine for reuse.
(PLATFORM_HEADER_DIR): Add.
(PLATFORM_HEADER_DEPENDENCIES): Add.
(FEATURE_AND_PLATFORM_DEFINE_DEPENDENCIES):
- Generate a makefile dependency list for <wtf/Platform.h>, then
  filter it to list only WebKit project headers.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (286017 => 286018)


--- trunk/Source/_javascript_Core/ChangeLog	2021-11-18 19:19:20 UTC (rev 286017)
+++ trunk/Source/_javascript_Core/ChangeLog	2021-11-18 19:30:52 UTC (rev 286018)
@@ -1,3 +1,29 @@
+2021-11-18  David Kilzer  <[email protected]>
+
+        Add missing dependencies for <wtf/Platform.h> when generating derived sources
+        <https://webkit.org/b/233304>
+        <rdar://problem/85533245>
+
+        Reviewed by Darin Adler.
+
+        * _javascript_Core.xcodeproj/project.pbxproj:
+        (Derived Sources : Generate Derived Sources):
+        - Add an input dependency on the script run from the build phase
+          script.
+
+        * DerivedSources-input.xcfilelist:
+        - Update after changes to DerivedSoures.make.  WebKit headers
+          included by <wtf/Platform.h> are now listed.
+        * DerivedSources.make:
+        (platform_h_compiler_command): Add.
+        (FEATURE_AND_PLATFORM_DEFINES):
+        - Extract compiler command into a call routine for reuse.
+        (PLATFORM_HEADER_DIR): Add.
+        (PLATFORM_HEADER_DEPENDENCIES): Add.
+        (FEATURE_AND_PLATFORM_DEFINE_DEPENDENCIES):
+        - Generate a makefile dependency list for <wtf/Platform.h>, then
+          filter it to list only WebKit project headers.
+
 2021-11-18  Carlos Garcia Campos  <[email protected]>
 
         [GLIB] jsc_value_object_define_property_accessor() throws an exception when called on a value without a wrapper instance

Modified: trunk/Source/_javascript_Core/DerivedSources-input.xcfilelist (286017 => 286018)


--- trunk/Source/_javascript_Core/DerivedSources-input.xcfilelist	2021-11-18 19:19:20 UTC (rev 286017)
+++ trunk/Source/_javascript_Core/DerivedSources-input.xcfilelist	2021-11-18 19:30:52 UTC (rev 286018)
@@ -1,4 +1,18 @@
 # This file is generated by the generate-xcfilelists script.
+$(BUILT_PRODUCTS_DIR)/usr/local/include/WebKitAdditions/AdditionalFeatureDefines.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/WebKitAdditions/AdditionalPlatform.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/bmalloc/BCompiler.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/bmalloc/BPlatform.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/Compiler.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/Platform.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/PlatformCPU.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/PlatformCallingConventions.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/PlatformEnable.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/PlatformEnableCocoa.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/PlatformHave.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/PlatformLegacy.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/PlatformOS.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/PlatformUse.h
 $(PROJECT_DIR)/DerivedSources.make
 $(PROJECT_DIR)/KeywordLookupGenerator.py
 $(PROJECT_DIR)/Scripts/UpdateContents.py

Modified: trunk/Source/_javascript_Core/DerivedSources.make (286017 => 286018)


--- trunk/Source/_javascript_Core/DerivedSources.make	2021-11-18 19:19:20 UTC (rev 286017)
+++ trunk/Source/_javascript_Core/DerivedSources.make	2021-11-18 19:30:52 UTC (rev 286018)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2020 Apple Inc. All rights reserved.
+# Copyright (C) 2006-2021 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -43,11 +43,15 @@
 
 FRAMEWORK_FLAGS := $(shell echo $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_SEARCH_PATHS) $(SYSTEM_FRAMEWORK_SEARCH_PATHS) | $(PERL) -e 'print "-F " . join(" -F ", split(" ", <>));')
 HEADER_FLAGS := $(shell echo $(BUILT_PRODUCTS_DIR) $(HEADER_SEARCH_PATHS) $(SYSTEM_HEADER_SEARCH_PATHS) | $(PERL) -e 'print "-I" . join(" -I", split(" ", <>));')
-FEATURE_AND_PLATFORM_DEFINES := $(shell $(CC) -std=gnu++1z -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | $(PERL) -ne "print if s/\#define ((HAVE_|USE_|ENABLE_|WTF_PLATFORM_)\w+) 1/\1/")
 
-# FIXME: This should list Platform.h and all the things it includes. Could do that by using the -MD flag in the CC line above.
-FEATURE_AND_PLATFORM_DEFINE_DEPENDENCIES = DerivedSources.make
+platform_h_compiler_command = $(CC) -std=gnu++1z -x c++ $(1) $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null
 
+FEATURE_AND_PLATFORM_DEFINES := $(shell $(call platform_h_compiler_command,-E -P -dM) | $(PERL) -ne "print if s/\#define ((HAVE_|USE_|ENABLE_|WTF_PLATFORM_)\w+) 1/\1/")
+
+PLATFORM_HEADER_DIR := $(realpath $(BUILT_PRODUCTS_DIR)/usr/local/include)
+PLATFORM_HEADER_DEPENDENCIES := $(filter $(PLATFORM_HEADER_DIR)/%,$(realpath $(shell $(call platform_h_compiler_command,-M) | $(PERL) -e "local \$$/; my (\$$target, \$$deps) = split(/:/, <>); print split(/\\\\/, \$$deps);")))
+FEATURE_AND_PLATFORM_DEFINE_DEPENDENCIES = DerivedSources.make $(PLATFORM_HEADER_DEPENDENCIES)
+
 # --------
 
 VPATH = \

Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (286017 => 286018)


--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2021-11-18 19:19:20 UTC (rev 286017)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2021-11-18 19:30:52 UTC (rev 286018)
@@ -11670,6 +11670,7 @@
 				"$(SRCROOT)/DerivedSources-input.xcfilelist",
 			);
 			inputPaths = (
+				"$(SRCROOT)/Scripts/generate-derived-sources.sh",
 			);
 			name = "Generate Derived Sources";
 			outputFileListPaths = (

Modified: trunk/Source/WebCore/ChangeLog (286017 => 286018)


--- trunk/Source/WebCore/ChangeLog	2021-11-18 19:19:20 UTC (rev 286017)
+++ trunk/Source/WebCore/ChangeLog	2021-11-18 19:30:52 UTC (rev 286018)
@@ -1,3 +1,29 @@
+2021-11-18  David Kilzer  <[email protected]>
+
+        Add missing dependencies for <wtf/Platform.h> when generating derived sources
+        <https://webkit.org/b/233304>
+        <rdar://problem/85533245>
+
+        Reviewed by Darin Adler.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        (Derived Sources : Generate Derived Sources):
+        - Add an input dependency on the script run from the build phase
+          script.
+
+        * DerivedSources-input.xcfilelist:
+        - Update after changes to DerivedSoures.make.  WebKit headers
+          included by <wtf/Platform.h> are now listed.
+        * DerivedSources.make:
+        (platform_h_compiler_command): Add.
+        (FEATURE_AND_PLATFORM_DEFINES):
+        - Extract compiler command into a call routine for reuse.
+        (PLATFORM_HEADER_DIR): Add.
+        (PLATFORM_HEADER_DEPENDENCIES): Add.
+        (FEATURE_AND_PLATFORM_DEFINE_DEPENDENCIES):
+        - Generate a makefile dependency list for <wtf/Platform.h>, then
+          filter it to list only WebKit project headers.
+
 2021-11-18  Christopher Reid  <[email protected]>
 
         [Win] Build fix after r285991

Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (286017 => 286018)


--- trunk/Source/WebCore/DerivedSources-input.xcfilelist	2021-11-18 19:19:20 UTC (rev 286017)
+++ trunk/Source/WebCore/DerivedSources-input.xcfilelist	2021-11-18 19:30:52 UTC (rev 286018)
@@ -1,4 +1,17 @@
 # This file is generated by the generate-xcfilelists script.
+$(BUILT_PRODUCTS_DIR)/usr/local/include/WebKitAdditions/AdditionalFeatureDefines.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/bmalloc/BCompiler.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/bmalloc/BPlatform.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/Compiler.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/Platform.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/PlatformCPU.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/PlatformCallingConventions.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/PlatformEnable.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/PlatformEnableCocoa.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/PlatformHave.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/PlatformLegacy.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/PlatformOS.h
+$(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/PlatformUse.h
 $(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/Scripts/Preferences/WebPreferences.yaml
 $(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/Scripts/Preferences/WebPreferencesDebug.yaml
 $(BUILT_PRODUCTS_DIR)/usr/local/include/wtf/Scripts/Preferences/WebPreferencesExperimental.yaml
@@ -158,6 +171,7 @@
 $(PROJECT_DIR)/Modules/WebGPU/GPUVertexStepMode.idl
 $(PROJECT_DIR)/Modules/WebGPU/NavigatorGPU.idl
 $(PROJECT_DIR)/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl
+$(PROJECT_DIR)/Modules/applepay-ams-ui/ApplePayAMSUIRequest.idl
 $(PROJECT_DIR)/Modules/applepay/ApplePayCancelEvent.idl
 $(PROJECT_DIR)/Modules/applepay/ApplePayContactField.idl
 $(PROJECT_DIR)/Modules/applepay/ApplePayCouponCodeChangedEvent.idl
@@ -205,7 +219,6 @@
 $(PROJECT_DIR)/Modules/applepay/ApplePayValidateMerchantEvent.idl
 $(PROJECT_DIR)/Modules/applepay/paymentrequest/ApplePayModifier.idl
 $(PROJECT_DIR)/Modules/applepay/paymentrequest/ApplePayRequest.idl
-$(PROJECT_DIR)/Modules/applepay-ams-ui/ApplePayAMSUIRequest.idl
 $(PROJECT_DIR)/Modules/async-clipboard/Clipboard.idl
 $(PROJECT_DIR)/Modules/async-clipboard/ClipboardItem.idl
 $(PROJECT_DIR)/Modules/async-clipboard/Navigator+Clipboard.idl

Modified: trunk/Source/WebCore/DerivedSources.make (286017 => 286018)


--- trunk/Source/WebCore/DerivedSources.make	2021-11-18 19:19:20 UTC (rev 286017)
+++ trunk/Source/WebCore/DerivedSources.make	2021-11-18 19:30:52 UTC (rev 286018)
@@ -45,11 +45,15 @@
 
 FRAMEWORK_FLAGS := $(shell echo $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_SEARCH_PATHS) $(SYSTEM_FRAMEWORK_SEARCH_PATHS) | $(PERL) -e 'print "-F " . join(" -F ", split(" ", <>));')
 HEADER_FLAGS := $(shell echo $(BUILT_PRODUCTS_DIR) $(HEADER_SEARCH_PATHS) $(SYSTEM_HEADER_SEARCH_PATHS) | $(PERL) -e 'print "-I" . join(" -I", split(" ", <>));')
-FEATURE_AND_PLATFORM_DEFINES := $(shell $(CC) -std=gnu++1z -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | $(PERL) -ne "print if s/\#define ((HAVE_|USE_|ENABLE_|WTF_PLATFORM_)\w+) 1/\1/")
 
-# FIXME: This should list Platform.h and all the things it includes. Could do that by using the -MD flag in the CC line above.
-FEATURE_AND_PLATFORM_DEFINE_DEPENDENCIES = $(WebCore)/DerivedSources.make
+platform_h_compiler_command = $(CC) -std=gnu++1z -x c++ $(1) $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null
 
+FEATURE_AND_PLATFORM_DEFINES := $(shell $(call platform_h_compiler_command,-E -P -dM) | $(PERL) -ne "print if s/\#define ((HAVE_|USE_|ENABLE_|WTF_PLATFORM_)\w+) 1/\1/")
+
+PLATFORM_HEADER_DIR := $(realpath $(BUILT_PRODUCTS_DIR)/usr/local/include)
+PLATFORM_HEADER_DEPENDENCIES := $(filter $(PLATFORM_HEADER_DIR)/%,$(realpath $(shell $(call platform_h_compiler_command,-M) | $(PERL) -e "local \$$/; my (\$$target, \$$deps) = split(/:/, <>); print split(/\\\\/, \$$deps);")))
+FEATURE_AND_PLATFORM_DEFINE_DEPENDENCIES = $(WebCore)/DerivedSources.make $(PLATFORM_HEADER_DEPENDENCIES)
+
 # --------
 
 JS_BINDING_IDLS := \

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (286017 => 286018)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-11-18 19:19:20 UTC (rev 286017)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-11-18 19:30:52 UTC (rev 286018)
@@ -37413,6 +37413,7 @@
 				"$(WK_WEBCORE_DERIVEDSOURCES_INPUT_XCFILELIST_ADDITIONS)",
 			);
 			inputPaths = (
+				"$(SRCROOT)/Scripts/generate-derived-sources.sh",
 			);
 			name = "Generate Derived Sources";
 			outputFileListPaths = (
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to