File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -472,13 +472,6 @@ def build_swiftpm_with_swiftpm(args):
472
472
"--disable-sandbox" ,
473
473
]
474
474
475
- build_target = get_build_target (args )
476
- cross_compile_hosts = args .cross_compile_hosts
477
- if build_target == 'x86_64-apple-macosx' and "macosx-arm64" in cross_compile_hosts :
478
- swiftpm_args += ["--arch" , "x86_64" , "--arch" , "arm64" ]
479
- elif cross_compile_hosts :
480
- error ("cannot cross-compile for %s" % cross_compile_hosts )
481
-
482
475
call_swiftpm (args , swiftpm_args )
483
476
484
477
# Setup symlinks that'll allow using swiftpm from the build directory.
@@ -610,6 +603,13 @@ def get_swiftpm_flags(args):
610
603
if 'ANDROID_DATA' in os .environ :
611
604
build_flags .extend (["-Xswiftc" , "-Xcc" , "-Xswiftc" , "-U_GNU_SOURCE" ])
612
605
606
+ build_target = get_build_target (args )
607
+ cross_compile_hosts = args .cross_compile_hosts
608
+ if build_target == 'x86_64-apple-macosx' and "macosx-arm64" in cross_compile_hosts :
609
+ build_flags += ["--arch" , "x86_64" , "--arch" , "arm64" ]
610
+ elif cross_compile_hosts :
611
+ error ("cannot cross-compile for %s" % cross_compile_hosts )
612
+
613
613
return build_flags
614
614
615
615
if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments