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):
174
174
175
175
176
176
for 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
+
177
183
print ("Generating metadata for " + arch )
178
184
generate_metadata (arch )
Original file line number Diff line number Diff line change @@ -44,17 +44,19 @@ function GEN_MODULEMAP() {
44
44
}
45
45
46
46
function GEN_METADATA() {
47
+ TARGET_ARCH=$1
47
48
set -e
48
49
cpu_arch=$( uname -m)
49
50
pushd " $SRCROOT /internal/metadata-generator-${cpu_arch} /bin"
50
- ./build-step-metadata-generator.py
51
+ ./build-step-metadata-generator.py $TARGET_ARCH
51
52
popd
52
53
}
53
54
54
55
# 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
56
58
printf " Generating metadata..."
57
- GEN_METADATA
59
+ GEN_METADATA $TARGET_ARCH
58
60
DELETE_SWIFT_MODULES_DIR
59
61
NS_LD=" ${NS_LD:- " $TOOLCHAIN_DIR /usr/bin/clang" } "
60
62
$NS_LD " $@ "
You can’t perform that action at this time.
0 commit comments