Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Use buildroot clang for scenario app #21690

Merged
merged 8 commits into from
Oct 12, 2020
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion testing/scenario_app/compile_ios_jit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,19 @@ 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="../../../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 the ld specified in PATH instead of the one from the active xcode
# toolchain (the default).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: update this comment to reflect actual change please

#
# When linking against a newer iOS SDK (newer SYSROOT) with an older version of
# clang, the linker from the old toolchain may refuse to link against new TAPI
# files provided in the new SDK. 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" \
Expand Down