Skip to content

Commit e920166

Browse files
authored
Merge pull request #1169 from edymtt/cmake_os_architectures_for_everyone
Set explicitly the desired Darwin architecture for all CMake builds
2 parents bee79b2 + 12e0818 commit e920166

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Utilities/build-script-helper.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ def build_using_cmake(args, toolchain_bin, build_dir, targets):
425425
swift_flags.append('-target %s' % target)
426426
if platform.system() == 'Darwin':
427427
base_cmake_flags.append('-DCMAKE_OSX_DEPLOYMENT_TARGET=%s' % macos_deployment_target)
428+
base_cmake_flags.append('-DCMAKE_OSX_ARCHITECTURES=%s' % target.split('-')[0])
428429

429430
# Target directory for build artifacts
430431
# If building for a local compiler build, use the build directory directly
@@ -469,8 +470,6 @@ def build_llbuild_using_cmake(args, target, swiftc_exec, build_dir, base_cmake_f
469470
'-DCMAKE_CXX_FLAGS=-target %s' % target,
470471
'-DLLBUILD_SUPPORT_BINDINGS:=Swift'
471472
]
472-
if platform.system() == 'Darwin':
473-
flags.append('-DCMAKE_OSX_ARCHITECTURES=%s' % target.split('-')[0])
474473
llbuild_cmake_flags = base_cmake_flags + flags
475474
if args.sysroot:
476475
llbuild_cmake_flags.append('-DSQLite3_INCLUDE_DIR=%s/usr/include' % args.sysroot)

0 commit comments

Comments
 (0)