Skip to content

Commit 2adea3b

Browse files
authored
Set llvm_host_triple for cross-compiling macOS (#1004)
Since the build artifact for the cross-compiled arm build should run on an arm host, set the host variable instead of the default target triple variable
1 parent 3430e60 commit 2adea3b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ports/llvm-15/portfile.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ set(LLVM_LINK_JOBS 2)
294294

295295
# Cross compilation for M1
296296
if (VCPKG_TARGET_IS_OSX)
297-
set(LLVM_DEFAULT_TARGET_TRIPLE "${VCPKG_OSX_ARCHITECTURES}-apple-darwin")
298-
list(APPEND OPTIONS "-DLLVM_DEFAULT_TARGET_TRIPLE=${LLVM_DEFAULT_TARGET_TRIPLE}")
299-
message(STATUS "Default target triple ${LLVM_DEFAULT_TARGET_TRIPLE}")
297+
set(LLVM_HOST_TRIPLE "${VCPKG_OSX_ARCHITECTURES}-apple-darwin")
298+
list(APPEND OPTIONS "-DLLVM_HOST_TRIPLE=${LLVM_HOST_TRIPLE}")
299+
message(STATUS "Default host triple ${LLVM_HOST_TRIPLE}")
300300
endif()
301301

302302
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")

0 commit comments

Comments
 (0)