File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -815,12 +815,13 @@ def get_swiftpm_flags(args):
815
815
816
816
build_target = get_build_target (args )
817
817
cross_compile_hosts = args .cross_compile_hosts
818
- if build_target == 'x86_64-apple-macosx' and "macosx-arm64" in cross_compile_hosts :
819
- build_flags += ["--arch" , "x86_64" , "--arch" , "arm64" ]
820
- elif cross_compile_hosts and re .match ('android-' , cross_compile_hosts ):
821
- build_flags .extend (["--destination" , args .cross_compile_config ])
822
- elif cross_compile_hosts :
823
- error ("cannot cross-compile for %s" % cross_compile_hosts )
818
+ if cross_compile_hosts :
819
+ if re .search ('-apple-macosx' , build_target ) and re .match ('macosx-' , cross_compile_hosts ):
820
+ build_flags += ["--arch" , "x86_64" , "--arch" , "arm64" ]
821
+ elif re .match ('android-' , cross_compile_hosts ):
822
+ build_flags .extend (["--destination" , args .cross_compile_config ])
823
+ else :
824
+ error ("cannot cross-compile for %s" % cross_compile_hosts )
824
825
825
826
# Ensure we are not sharing the module cache with concurrent builds in CI
826
827
local_module_cache_path = os .path .join (args .build_dir , "module-cache" )
You can’t perform that action at this time.
0 commit comments