Skip to content

Commit

Permalink
[CI] Include -DLLVM_BYILD_LLVM_DYLIB on Darwin
Browse files Browse the repository at this point in the history
This extra CMake flag makse sure that libLLVM.dylib is built, which is
required when using `clang` from HomeBrew (which is built with LTO
enabled).
  • Loading branch information
banach-space committed Oct 2, 2022
1 parent 2462ff3 commit 9914bac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/x86-darwin-llvm-from-sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" \
-DLLVM_TARGETS_TO_BUILD="X86" \
-DLLVM_OPTIMIZED_TABLEGEN=ON \
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DDEFAULT_SYSROOT="$(xcrun --show-sdk-path)" \
../llvm
ninja
Expand Down
3 changes: 3 additions & 0 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ set(ct-code-style-checker_SOURCES
# triggered for static libs)
# * `libclang-cpp`/`libLLVM` include all Clang/LLVM libraries (i.e. all the
# libraries listed below _and more_)
#
# TODO: Once LLVM 16 is released, replace `try_compile` with a test for
# LLVM_ENABLE_LTO, see https://reviews.llvm.org/D134936.
set(libs "clangTooling")

try_compile(testMinimalCompilation "${CMAKE_BINARY_DIR}/temp" SOURCES
Expand Down

0 comments on commit 9914bac

Please sign in to comment.