Skip to content

Commit

Permalink
cmake: don't prefer homebrew clang on the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Dec 19, 2024
1 parent 235901e commit aefeba3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmake/LLVM.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
if(NOT CMAKE_TOOLCHAIN_FILE)
# Prefer the homebrew version because xcode clang doesn't have detect_leaks
# Note: CMAKE_SYSTEM_NAME is not available yet.
#
# Don't prefer homebrew clang on the CI because we want
# to produce universal binaries there.
if(NOT DEFINED ENV{CI})
if(NOT DEFINED CUSTOM_LLVM_HOME)
# Note: The recent macOS SDKs (eg. math.h from macOS SDK 15) assume that
# _Float16 is available. In case of x86, it's only available for the
Expand All @@ -9,6 +13,7 @@ if(NOT DEFINED CUSTOM_LLVM_HOME)
set(CUSTOM_LLVM_HOME /usr/local/opt/llvm@15)
endif()
endif()
endif()

if(DEFINED CUSTOM_LLVM_HOME)
find_program(CUSTOM_CLANG ${CUSTOM_LLVM_HOME}/bin/clang)
Expand Down

0 comments on commit aefeba3

Please sign in to comment.