Skip to content

Commit 5624caf

Browse files
committed
Avoid default LLVM runtimes on macOS
LLVM 22 works with current macOS SDK libc++ headers, so keep bundled runtimes opt-in and let the macOS devdeps cache track LLVM cache changes. Signed-off-by: Thomas Alexander <talexander@nvidia.com>
1 parent 2ede9fb commit 5624caf

2 files changed

Lines changed: 5 additions & 12 deletions

File tree

.github/workflows/dev_environment_macos.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ jobs:
9494
scripts/install_prerequisites.sh \
9595
scripts/build_llvm.sh \
9696
scripts/set_env_defaults.sh \
97+
cmake/caches/LLVM.cmake \
9798
.github/workflows/dev_environment_macos.yml \
9899
tpls/customizations/llvm/*.diff \
99100
| sha256sum | cut -c1-8)

scripts/set_env_defaults.sh

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,11 @@ if [ "$(uname)" = "Darwin" ]; then
3939
# Homebrew's libomp via 'brew install libomp'), set LLVM_PROJECTS without openmp.
4040
# `export LLVM_PROJECTS='clang;lld;mlir;python-bindings'`
4141
#
42-
# Detect whether the active macOS SDK's libc++ headers are compatible with
43-
# LLVM 16. SDK 26+ (Tahoe) removed __has_builtin guards for builtins like
44-
# __builtin_ctzg, making the headers incompatible with LLVM 16. In that case,
45-
# include runtimes (libc++, libcxxabi, etc.) so that nvq++ uses LLVM's own
46-
# libc++ headers. To force this behavior, set LLVM_PROJECTS to include 'runtimes'.
42+
# LLVM 22 is compatible with current macOS SDK libc++ headers, so runtimes are
43+
# not needed by default. To force bundled LLVM runtimes, set LLVM_PROJECTS to
44+
# include 'runtimes'.
4745
if [ -z "${LLVM_PROJECTS:-}" ]; then
48-
_cudaq_llvm_projects='clang;lld;mlir;python-bindings;openmp'
49-
_sdk_major="$(xcrun --show-sdk-version 2>/dev/null | cut -d. -f1)"
50-
if [ -n "$_sdk_major" ] && [ "$_sdk_major" -ge 26 ] 2>/dev/null; then
51-
_cudaq_llvm_projects="${_cudaq_llvm_projects};runtimes"
52-
fi
53-
export LLVM_PROJECTS="$_cudaq_llvm_projects"
54-
unset _cudaq_llvm_projects _sdk_major
46+
export LLVM_PROJECTS='clang;lld;mlir;python-bindings;openmp'
5547
fi
5648
# Set minimum macOS deployment target for consistent builds.
5749
# This ensures LLVM/clang and CUDA-Q libraries use the same target.

0 commit comments

Comments
 (0)