File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
project-template/internal Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -174,5 +174,11 @@ def generate_metadata(arch):
174174
175175
176176for arch in env("ARCHS").split():
177+ # skip metadata generation for architectures different than the one specified in the command line
178+ # in case the command line argument is not specified, generate metadata for all architectures
179+ if len(sys.argv) >= 2 and sys.argv[1].lower() != arch.lower():
180+ print("Skipping metadata generation for " + arch)
181+ continue
182+
177183 print("Generating metadata for " + arch)
178184 generate_metadata(arch)
Original file line number Diff line number Diff line change @@ -44,17 +44,19 @@ function GEN_MODULEMAP() {
4444}
4545
4646function GEN_METADATA() {
47+ TARGET_ARCH=$1
4748 set -e
4849 cpu_arch=$(uname -m)
4950 pushd "$SRCROOT/internal/metadata-generator-${cpu_arch}/bin"
50- ./build-step-metadata-generator.py
51+ ./build-step-metadata-generator.py $TARGET_ARCH
5152 popd
5253}
5354
5455# Workaround for ARCH being set to `undefined_arch` here. Extract it from command line arguments.
55- GEN_MODULEMAP $(getArch "$@")
56+ TARGET_ARCH=$(getArch "$@")
57+ GEN_MODULEMAP $TARGET_ARCH
5658printf "Generating metadata..."
57- GEN_METADATA
59+ GEN_METADATA $TARGET_ARCH
5860DELETE_SWIFT_MODULES_DIR
5961NS_LD="${NS_LD:-"$TOOLCHAIN_DIR/usr/bin/clang"}"
6062$NS_LD "$@"
You can’t perform that action at this time.
0 commit comments