Use buildroot clang for scenario app (#21690)

This commit is contained in:
LongCatIsLooong 2020-10-12 08:12:02 -07:00 committed by GitHub
parent bd03014c2e
commit f230fded75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,12 +85,15 @@ echo "Compiling JIT Snapshot..."
cp "$DEVICE_TOOLS/../gen/flutter/lib/snapshot/vm_isolate_snapshot.bin" "$OUTDIR/App.framework/flutter_assets/vm_snapshot_data"
LLVM_BIN_PATH="${SCRIPT_DIR}/../../../buildtools/mac-x64/clang/bin"
SYSROOT=$(xcrun --sdk iphonesimulator --show-sdk-path)
echo "Using $SYSROOT as sysroot."
echo "Creating stub App using $SYSROOT..."
echo "static const int Moo = 88;" | xcrun clang -x c \
# Use buildroot clang so we can override the linker to use in our LUCI recipe.
# See: https://github.com/flutter/flutter/issues/65901
echo "static const int Moo = 88;" | "$LLVM_BIN_PATH/clang" -x c \
-arch x86_64 \
-fembed-bitcode-marker \
-isysroot "$SYSROOT" \
@ -110,4 +113,3 @@ rm -rf "$SCRIPT_DIR/ios/Scenarios/App.framework"
rm -rf "$SCRIPT_DIR/ios/Scenarios/Flutter.framework"
cp -R "$OUTDIR/App.framework" "$SCRIPT_DIR/ios/Scenarios"
cp -R "$DEVICE_TOOLS/../Flutter.framework" "$SCRIPT_DIR/ios/Scenarios"