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.
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: http://svn.webkit.org/repository/webkit/trunk@237047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebKitLegacy/mac/migrate-headers.sh b/Source/WebKitLegacy/mac/migrate-headers.sh
index 9157615..f6c10f7 100755
--- a/Source/WebKitLegacy/mac/migrate-headers.sh
+++ b/Source/WebKitLegacy/mac/migrate-headers.sh
@@ -29,10 +29,14 @@
# 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