mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-13 09:20:50 +08:00
Fix Xcode 10 errors relating to third-party (#21458)
Summary: Fixes #20774 The new Xcode build system uses parallel execution to run build steps that don't have an obvious dependency. Our Xcode project was written with the assumption that the **Install Third Party** build step is run _before_ compiling the `third-party` libraries. To address this issue, this PR adds dependency information to the project to teach Xcode that `ios-install-third-party.sh` is generating the files under `third-party`. With this additional information, Xcode correctly waits for `ios-install-third-party.sh` to finish before advancing to the compile step. In addition to the Xcode project changes, I had to make some changes to the script `ios-install-third-party.sh` so that 1. it would always execute the `ios-configure-glog.sh` script regardless of how it was invoked 2. it would always install the libraries even if Xcode had partially created the tree or if a previous install was interrupted Pull Request resolved: https://github.com/facebook/react-native/pull/21458 Differential Revision: D10365495 Pulled By: hramos fbshipit-source-id: c88042583f21d2447a16f6ae2b6abb929c659a26
This commit is contained in:
committed by
Facebook Github Bot
parent
93e6ae1c0a
commit
b44c5ae92e
@@ -49,7 +49,7 @@ function fetch_and_unpack () {
|
||||
done
|
||||
|
||||
dir=$(basename "$file" .tar.gz)
|
||||
if [ "$fetched" = "yes" ] || [ ! -d "third-party/$dir" ]; then
|
||||
if [ "$fetched" = "yes" ] || [ ! -f "third-party/$dir/.installed" ]; then
|
||||
(cd third-party;
|
||||
rm -rf "$dir"
|
||||
echo Unpacking "$cachedir/$file"...
|
||||
@@ -57,13 +57,13 @@ function fetch_and_unpack () {
|
||||
file_fail "$cachedir/$file" "Unpacking '$cachedir/$file' failed"
|
||||
fi
|
||||
cd "$dir"
|
||||
eval "${cmd:-true}")
|
||||
eval "${cmd:-true}" && touch .installed)
|
||||
fi
|
||||
}
|
||||
|
||||
mkdir -p third-party
|
||||
|
||||
SCRIPTDIR=$(dirname "$0")
|
||||
SCRIPTDIR=$(cd $(dirname "$0") && pwd)
|
||||
|
||||
fetch_and_unpack glog-0.3.5.tar.gz https://github.com/google/glog/archive/v0.3.5.tar.gz 61067502c5f9769d111ea1ee3f74e6ddf0a5f9cc "\"$SCRIPTDIR/ios-configure-glog.sh\""
|
||||
fetch_and_unpack double-conversion-1.1.6.tar.gz https://github.com/google/double-conversion/archive/v1.1.6.tar.gz 1c7d88afde3aaeb97bb652776c627b49e132e8e0
|
||||
|
||||
Reference in New Issue
Block a user