CURRENT_ARCH should not be used in Run Script phase.
authorkrollin@apple.com <krollin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Oct 2018 21:22:40 +0000 (21:22 +0000)
committerkrollin@apple.com <krollin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Oct 2018 21:22:40 +0000 (21:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190407
<rdar://problem/45133556>

Reviewed by Alexey Proskuryakov.

CURRENT_ARCH is used in a number of Xcode Run Script phases. However,
CURRENT_ARCH is not well-defined during this phase (and may even have
the value "undefined") since this phase is run just once per build
rather than once per supported architecture. Migrate away from
CURRENT_ARCH in favor of ARCHS, either by iterating over ARCHS and
performing an operation for each value, or by picking the first entry
in ARCHS and using that as a representative value.

Source/JavaScriptCore:

* JavaScriptCore.xcodeproj/project.pbxproj: Store
LLIntDesiredOffsets.h into a directory with a name based on ARCHS
rather than CURRENT_ARCH.

Source/WebCore:

No new tests -- no functional changes.

* DerivedSources.make: When forming TARGET_TRIPLE_FLAGS, grab the
first entry in ARCHS rather than use CURRENT_ARCH.

Source/WebKit:

* DerivedSources.make: When forming TARGET_TRIPLE_FLAGS, grab the
first entry in ARCHS rather than use CURRENT_ARCH.

Source/WebKitLegacy:

* WebKitLegacy.xcodeproj/project.pbxproj: When generating
WebKitLegacy.*.exp, generate both 32- and 64-bit versions for
macosx platforms.

Source/WebKitLegacy/mac:

* Configurations/WebKitLegacy.xcconfig: When generating
WebKitLegacy.*.exp, generate both 32- and 64-bit versions for
macosx platforms.

* MigrateHeaders.make:
* migrate-headers.sh: When generating ReexportedWebCoreSymbols_*.exp,
generate one for each architecture in ARCHS.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237047 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebKit/ChangeLog
Source/WebKit/DerivedSources.make
Source/WebKitLegacy/ChangeLog
Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig
Source/WebKitLegacy/mac/MigrateHeaders.make
Source/WebKitLegacy/mac/migrate-headers.sh

index 098a061..5186d15 100644 (file)
@@ -1,3 +1,23 @@
+2018-10-11  Keith Rollin  <krollin@apple.com>
+
+        CURRENT_ARCH should not be used in Run Script phase.
+        https://bugs.webkit.org/show_bug.cgi?id=190407
+        <rdar://problem/45133556>
+
+        Reviewed by Alexey Proskuryakov.
+
+        CURRENT_ARCH is used in a number of Xcode Run Script phases. However,
+        CURRENT_ARCH is not well-defined during this phase (and may even have
+        the value "undefined") since this phase is run just once per build
+        rather than once per supported architecture. Migrate away from
+        CURRENT_ARCH in favor of ARCHS, either by iterating over ARCHS and
+        performing an operation for each value, or by picking the first entry
+        in ARCHS and using that as a representative value.
+
+        * JavaScriptCore.xcodeproj/project.pbxproj: Store
+        LLIntDesiredOffsets.h into a directory with a name based on ARCHS
+        rather than CURRENT_ARCH.
+
 2018-10-10  Mark Lam  <mark.lam@apple.com>
 
         Changes towards allowing use of the ASAN detect_stack_use_after_return option.
index 888dd13..2e37e93 100644 (file)
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                        shellPath = /bin/sh;
-                       shellScript = "set -e\n\nmkdir -p \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${CURRENT_ARCH}\"\n\n/usr/bin/env ruby \"${SRCROOT}/offlineasm/generate_offset_extractor.rb\" \"-I${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\" \"${SRCROOT}/llint/LowLevelInterpreter.asm\" \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${CURRENT_ARCH}/LLIntDesiredOffsets.h\" \"${ARCHS} C_LOOP\"\n";
+                       shellScript = "set -e\n\nmkdir -p \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}\"\n\n/usr/bin/env ruby \"${SRCROOT}/offlineasm/generate_offset_extractor.rb\" \"-I${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\" \"${SRCROOT}/llint/LowLevelInterpreter.asm\" \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}/LLIntDesiredOffsets.h\" \"${ARCHS} C_LOOP\"\n";
                };
                1A02D9A81B34A882000D1522 /* Add Symlink in /System/Library/PrivateFrameworks */ = {
                        isa = PBXShellScriptBuildPhase;
                        buildSettings = {
                                HEADER_SEARCH_PATHS = (
                                        "\"${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\"",
-                                       "\"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${CURRENT_ARCH}\"",
+                                       "\"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}\"",
                                        "\"$(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/PrivateHeaders\"",
                                        "$(inherited)",
                                );
                        buildSettings = {
                                HEADER_SEARCH_PATHS = (
                                        "\"${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\"",
-                                       "\"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${CURRENT_ARCH}\"",
+                                       "\"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}\"",
                                        "\"$(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/PrivateHeaders\"",
                                        "$(inherited)",
                                );
                        buildSettings = {
                                HEADER_SEARCH_PATHS = (
                                        "\"${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\"",
-                                       "\"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${CURRENT_ARCH}\"",
+                                       "\"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}\"",
                                        "\"$(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/PrivateHeaders\"",
                                        "$(inherited)",
                                );
                        buildSettings = {
                                HEADER_SEARCH_PATHS = (
                                        "\"${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\"",
-                                       "\"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${CURRENT_ARCH}\"",
+                                       "\"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}\"",
                                        "\"$(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/PrivateHeaders\"",
                                        "$(inherited)",
                                );
index aeb7438..7fc75b0 100644 (file)
@@ -1,3 +1,24 @@
+2018-10-11  Keith Rollin  <krollin@apple.com>
+
+        CURRENT_ARCH should not be used in Run Script phase.
+        https://bugs.webkit.org/show_bug.cgi?id=190407
+        <rdar://problem/45133556>
+
+        Reviewed by Alexey Proskuryakov.
+
+        CURRENT_ARCH is used in a number of Xcode Run Script phases. However,
+        CURRENT_ARCH is not well-defined during this phase (and may even have
+        the value "undefined") since this phase is run just once per build
+        rather than once per supported architecture. Migrate away from
+        CURRENT_ARCH in favor of ARCHS, either by iterating over ARCHS and
+        performing an operation for each value, or by picking the first entry
+        in ARCHS and using that as a representative value.
+
+        No new tests -- no functional changes.
+
+        * DerivedSources.make: When forming TARGET_TRIPLE_FLAGS, grab the
+        first entry in ARCHS rather than use CURRENT_ARCH.
+
 2018-10-11  Daniel Bates  <dabates@apple.com>
 
         Support building WebKit for macOS Mojave using a newer SDK
index 0954c27..2b10152 100644 (file)
@@ -1043,7 +1043,8 @@ ifneq ($(SDKROOT),)
 endif
 
 ifeq ($(USE_LLVM_TARGET_TRIPLES_FOR_CLANG),YES)
-       TARGET_TRIPLE_FLAGS=-target $(CURRENT_ARCH)-$(LLVM_TARGET_TRIPLE_VENDOR)-$(LLVM_TARGET_TRIPLE_OS_VERSION)$(LLVM_TARGET_TRIPLE_SUFFIX)
+       WK_CURRENT_ARCH=$(word 1, $(ARCHS))
+       TARGET_TRIPLE_FLAGS=-target $(WK_CURRENT_ARCH)-$(LLVM_TARGET_TRIPLE_VENDOR)-$(LLVM_TARGET_TRIPLE_OS_VERSION)$(LLVM_TARGET_TRIPLE_SUFFIX)
 endif
 
 ifeq ($(shell $(CC) -std=gnu++14 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ' WTF_PLATFORM_IOS ' | cut -d' ' -f3), 1)
index 325c93b..0d62f61 100644 (file)
@@ -1,3 +1,22 @@
+2018-10-11  Keith Rollin  <krollin@apple.com>
+
+        CURRENT_ARCH should not be used in Run Script phase.
+        https://bugs.webkit.org/show_bug.cgi?id=190407
+        <rdar://problem/45133556>
+
+        Reviewed by Alexey Proskuryakov.
+
+        CURRENT_ARCH is used in a number of Xcode Run Script phases. However,
+        CURRENT_ARCH is not well-defined during this phase (and may even have
+        the value "undefined") since this phase is run just once per build
+        rather than once per supported architecture. Migrate away from
+        CURRENT_ARCH in favor of ARCHS, either by iterating over ARCHS and
+        performing an operation for each value, or by picking the first entry
+        in ARCHS and using that as a representative value.
+
+        * DerivedSources.make: When forming TARGET_TRIPLE_FLAGS, grab the
+        first entry in ARCHS rather than use CURRENT_ARCH.
+
 2018-10-11  Chris Dumez  <cdumez@apple.com>
 
         Regression(PSON): Deal with the drawing area potentially being null under WebChromeClient::contentsSizeChanged()
index 4dfb170..fe551f4 100644 (file)
@@ -221,7 +221,8 @@ ifneq ($(SDKROOT),)
 endif
 
 ifeq ($(USE_LLVM_TARGET_TRIPLES_FOR_CLANG),YES)
-       TARGET_TRIPLE_FLAGS=-target $(CURRENT_ARCH)-$(LLVM_TARGET_TRIPLE_VENDOR)-$(LLVM_TARGET_TRIPLE_OS_VERSION)$(LLVM_TARGET_TRIPLE_SUFFIX)
+       WK_CURRENT_ARCH=$(word 1, $(ARCHS))
+       TARGET_TRIPLE_FLAGS=-target $(WK_CURRENT_ARCH)-$(LLVM_TARGET_TRIPLE_VENDOR)-$(LLVM_TARGET_TRIPLE_OS_VERSION)$(LLVM_TARGET_TRIPLE_SUFFIX)
 endif
 
 SANDBOX_PROFILES = \
index f627d59..3d01795 100644 (file)
@@ -1,3 +1,23 @@
+2018-10-11  Keith Rollin  <krollin@apple.com>
+
+        CURRENT_ARCH should not be used in Run Script phase.
+        https://bugs.webkit.org/show_bug.cgi?id=190407
+        <rdar://problem/45133556>
+
+        Reviewed by Alexey Proskuryakov.
+
+        CURRENT_ARCH is used in a number of Xcode Run Script phases. However,
+        CURRENT_ARCH is not well-defined during this phase (and may even have
+        the value "undefined") since this phase is run just once per build
+        rather than once per supported architecture. Migrate away from
+        CURRENT_ARCH in favor of ARCHS, either by iterating over ARCHS and
+        performing an operation for each value, or by picking the first entry
+        in ARCHS and using that as a representative value.
+
+        * WebKitLegacy.xcodeproj/project.pbxproj: When generating
+        WebKitLegacy.*.exp, generate both 32- and 64-bit versions for
+        macosx platforms.
+
 2018-10-04  Dan Bernstein  <mitz@apple.com>
 
         WebKitLegacy part of [Xcode] Update some build settings as recommended by Xcode 10
index b562fe4..0d172a7 100644 (file)
                                9398100D0824BF01008DF038 /* Headers */,
                                A13EE61D185AE82700556064 /* Postprocess Headers */,
                                939810B20824BF01008DF038 /* Resources */,
-                               939810BB0824BF01008DF038 /* Sources */,
                                1C395DE20C6BE8E0000D1E52 /* Generate Export Files */,
+                               939810BB0824BF01008DF038 /* Sources */,
                                939811270824BF01008DF038 /* Frameworks */,
                                5D0D54210E98631D0029E223 /* Check For Weak VTables and Externals */,
                                3713F018142905B70036387F /* Check For Inappropriate Objective-C Class Names */,
                        files = (
                        );
                        inputPaths = (
-                               "$(SRCROOT)/mac/WebKit.exp",
-                               "$(SRCROOT)/ios/WebKit.iOS.exp",
-                               "$(SRCROOT)/mac/WebKit.mac.exp",
-                               "$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/ReexportedWebCoreSymbols_$(CURRENT_ARCH).exp",
                        );
                        name = "Generate Export Files";
                        outputPaths = (
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                        shellPath = /bin/sh;
-                       shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy\"\n\nif [[ \"${WK_PLATFORM_NAME}\" != \"macosx\" ]]; then\n    cat \"${PROJECT_DIR}/mac/WebKit.exp\" \"${PROJECT_DIR}/ios/WebKit.iOS.exp\" > \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp\"\nelse\n    cat \"${PROJECT_DIR}/mac/WebKit.exp\" \"${PROJECT_DIR}/mac/WebKit.mac.exp\" > \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp\"\nfi\n\nif [ -f \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/ReexportedWebCoreSymbols_${CURRENT_ARCH}.exp\" ]; then\n    cat \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/ReexportedWebCoreSymbols_${CURRENT_ARCH}.exp\" >> \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp\"\nfi\n\n# exclude Carbon functions on 64-bit\nsed -e s/^_HIWebViewCreate$// -e s/^_HIWebViewGetWebView$// -e s/^_WebConvertNSImageToCGImageRef$// -e s/^_WebInitForCarbon$// \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp\" > \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.LP64.exp\"\n\n# exclude OBJC_IVAR for i386\ngrep -v \"_OBJC_IVAR\" \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp\" > \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebKitLegacy.i386.exp\"";
+                       shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy\"\n\nfor WK_CURRENT_ARCH in ${ARCHS}; do\n    if [[ \"${WK_PLATFORM_NAME}\" != \"macosx\" ]]; then\n        EXP_GENERATED=\"${EXPORTED_SYMBOLS_FILE_cocoatouch}\"\n        EXP_WEBKIT_PLATFORM=\"${PROJECT_DIR}/ios/WebKit.iOS.exp\"\n    else\n        eval EXP_GENERATED=\"\\${EXPORTED_SYMBOLS_FILE_${WK_CURRENT_ARCH}}\"\n        EXP_WEBKIT_PLATFORM=\"${PROJECT_DIR}/mac/WebKit.mac.exp\"\n    fi\n\n    [[ -z \"${EXP_GENERATED}\" ]] && exit 1\n\n    cat \"${PROJECT_DIR}/mac/WebKit.exp\" > \"${EXP_GENERATED}\"\n    cat \"${EXP_WEBKIT_PLATFORM}\" >> \"${EXP_GENERATED}\"\n\n    EXP_REEXPORTED=\"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/ReexportedWebCoreSymbols_${WK_CURRENT_ARCH}.exp\"\n    [[ -f \"${EXP_REEXPORTED}\" ]] && cat \"${EXP_REEXPORTED}\" >> \"${EXP_GENERATED}\"\n\n    if [[ \"${WK_CURRENT_ARCH}\" == \"i386\" ]]; then\n        # exclude OBJC_IVAR for i386\n        sed -e 's/.*_OBJC_IVAR.*//' -i \"\" \"${EXP_GENERATED}\"\n    elif [[ \"${WK_CURRENT_ARCH}\" == \"x86_64\" ]]; then\n        # exclude Carbon functions on 64-bit\n        sed -e s/^_HIWebViewCreate$// -e s/^_HIWebViewGetWebView$// -e s/^_WebConvertNSImageToCGImageRef$// -e s/^_WebInitForCarbon$// -i \"\" \"${EXP_GENERATED}\"\n    fi\ndone\n";
                };
                1C6CB0510AA63EB000D23BFD /* Migrate Headers */ = {
                        isa = PBXShellScriptBuildPhase;
index 42c5264..a818b5d 100644 (file)
@@ -1,3 +1,27 @@
+2018-10-11  Keith Rollin  <krollin@apple.com>
+
+        CURRENT_ARCH should not be used in Run Script phase.
+        https://bugs.webkit.org/show_bug.cgi?id=190407
+        <rdar://problem/45133556>
+
+        Reviewed by Alexey Proskuryakov.
+
+        CURRENT_ARCH is used in a number of Xcode Run Script phases. However,
+        CURRENT_ARCH is not well-defined during this phase (and may even have
+        the value "undefined") since this phase is run just once per build
+        rather than once per supported architecture. Migrate away from
+        CURRENT_ARCH in favor of ARCHS, either by iterating over ARCHS and
+        performing an operation for each value, or by picking the first entry
+        in ARCHS and using that as a representative value.
+
+        * Configurations/WebKitLegacy.xcconfig: When generating
+        WebKitLegacy.*.exp, generate both 32- and 64-bit versions for
+        macosx platforms.
+
+        * MigrateHeaders.make:
+        * migrate-headers.sh: When generating ReexportedWebCoreSymbols_*.exp,
+        generate one for each architecture in ARCHS.
+
 2018-10-10  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
 
         [JSC] Rename createXXX to tryCreateXXX if it can return RefPtr
index 993fac5..7c8142b 100644 (file)
@@ -30,8 +30,10 @@ EXCLUDED_SOURCE_FILE_NAMES_ = *IOS.mm MemoryMeasure.h WebCaretChangeListener.h W
 
 EXPORTED_SYMBOLS_FILE = $(EXPORTED_SYMBOLS_FILE_$(WK_COCOA_TOUCH));
 EXPORTED_SYMBOLS_FILE_cocoatouch = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp;
-EXPORTED_SYMBOLS_FILE_[arch=i386] = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/WebKitLegacy.i386.exp;
-EXPORTED_SYMBOLS_FILE_[arch=x86_64] = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/WebKitLegacy.LP64.exp;
+EXPORTED_SYMBOLS_FILE_[arch=i386] = $(EXPORTED_SYMBOLS_FILE_i386)
+EXPORTED_SYMBOLS_FILE_[arch=x86_64] = $(EXPORTED_SYMBOLS_FILE_x86_64)
+EXPORTED_SYMBOLS_FILE_i386 = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/WebKitLegacy.i386.exp;
+EXPORTED_SYMBOLS_FILE_x86_64 = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/WebKitLegacy.LP64.exp;
 
 WK_PRIVATE_FRAMEWORKS_DIR = $(WK_PRIVATE_FRAMEWORKS_DIR_$(USE_INTERNAL_SDK));
 WK_PRIVATE_FRAMEWORKS_DIR_[sdk=iphone*] = $(PROJECT_DIR)/../../WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/$(WK_TARGET_IOS_VERSION_MAJOR);
index 770e063..d3b5525 100644 (file)
@@ -67,8 +67,8 @@ HEADERS += \
     $(PRIVATE_HEADERS_DIR)/WebEventRegion.h
 endif
 
-.PHONY : all
-all : $(HEADERS)
+.PHONY : migrate_headers
+migrate_headers : $(HEADERS)
 
 WEBCORE_HEADER_REPLACE_RULES = -e 's/<WebCore\//<WebKitLegacy\//' -e "s/(^ *)WEBCORE_EXPORT /\1/"
 WEBCORE_HEADER_MIGRATE_CMD = sed -E $(WEBCORE_HEADER_REPLACE_RULES) $< > $@; touch $(PRIVATE_HEADERS_DIR)
@@ -80,13 +80,15 @@ $(PRIVATE_HEADERS_DIR)/% : % MigrateHeaders.make
        $(WEBCORE_HEADER_MIGRATE_CMD)
 
 ifneq ($(WK_PLATFORM_NAME), macosx)
-REEXPORT_FILE = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/ReexportedWebCoreSymbols_$(CURRENT_ARCH).exp
 
-all : $(REEXPORT_FILE)
+REEXPORT_FILE = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/ReexportedWebCoreSymbols_$(WK_CURRENT_ARCH).exp
+
+.PHONY : reexport_headers
+reexport_headers : $(REEXPORT_FILE)
 
 TAPI_PATH = $(strip $(shell xcrun --find tapi 2>/dev/null))
 ifneq (,$(TAPI_PATH))
-REEXPORT_COMMAND = $(TAPI_PATH) reexport -arch $(CURRENT_ARCH) -$(DEPLOYMENT_TARGET_CLANG_FLAG_NAME)=$($(DEPLOYMENT_TARGET_CLANG_ENV_NAME)) -isysroot $(SDK_DIR) $(HEADER_FLAGS) $(FRAMEWORK_FLAGS) $^ -o $@
+REEXPORT_COMMAND = $(TAPI_PATH) reexport -arch $(WK_CURRENT_ARCH) -$(DEPLOYMENT_TARGET_CLANG_FLAG_NAME)=$($(DEPLOYMENT_TARGET_CLANG_ENV_NAME)) -isysroot $(SDK_DIR) $(HEADER_FLAGS) $(FRAMEWORK_FLAGS) $^ -o $@
 else
 # Temporary stub for SDKs that don't have the tapi command, <rdar://problem/24582471>.
 REEXPORT_COMMAND = touch $@
@@ -94,4 +96,10 @@ endif
 
 $(REEXPORT_FILE) : $(HEADERS)
        $(REEXPORT_COMMAND)
+
+else
+
+.PHONY : reexport_headers
+reexport_headers :
+
 endif
index 9157615..f6c10f7 100755 (executable)
@@ -29,10 +29,14 @@ mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy"
 
 # If we didn't build WebCore, use the production copy of the headers
 if [ ! -d "${WEBCORE_PRIVATE_HEADERS_DIR}" ]; then
-    export WEBCORE_PRIVATE_HEADERS_DIR="`eval 'echo ${WEBCORE_PRIVATE_HEADERS_DIR_Production}'`"
+    export WEBCORE_PRIVATE_HEADERS_DIR="${WEBCORE_PRIVATE_HEADERS_DIR_Production}"
 fi
 
 if [ "${ACTION}" = "build" -o "${ACTION}" = "install" -o "${ACTION}" = "installhdrs" -o "${ACTION}" = "installapi" ]; then
     ln -sfh "${WEBCORE_PRIVATE_HEADERS_DIR}" "${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy/WebCorePrivateHeaders"
-    make -C mac -f "MigrateHeaders.make" -j `/usr/sbin/sysctl -n hw.activecpu`
+
+    make -C mac -f "MigrateHeaders.make" -j `/usr/sbin/sysctl -n hw.activecpu` migrate_headers
+    for WK_CURRENT_ARCH in ${ARCHS}; do
+        make -C mac -f "MigrateHeaders.make" -j `/usr/sbin/sysctl -n hw.activecpu` WK_CURRENT_ARCH=${WK_CURRENT_ARCH} reexport_headers
+    done
 fi