diff options
author | Fraser Cormack <fraser@codeplay.com> | 2024-04-08 11:01:58 +0100 |
---|---|---|
committer | Fraser Cormack <fraser@codeplay.com> | 2024-04-08 11:05:38 +0100 |
commit | 8461d901a770516cf2069fe3bce979a6f8fc8d76 (patch) | |
tree | 52dd12876c2b466da9d147acce34aa1a6e0285b7 /libclc | |
parent | 170c525d79a4ab3659041b0655ac9697768fc915 (diff) | |
download | llvm-8461d901a770516cf2069fe3bce979a6f8fc8d76.zip llvm-8461d901a770516cf2069fe3bce979a6f8fc8d76.tar.gz llvm-8461d901a770516cf2069fe3bce979a6f8fc8d76.tar.bz2 |
[libclc] Restore linking against dynamic libLLVM for out-of-tree builds
This fixes a regression where building against an installation without
the static libraries would fail. This just reinstates the old behaviour
for out-of-tree builds, assuming that in-tree builds (which still aren't
officially supported) will have the static libraries available. We can
refine this as we move towards supporting in-tree builds.
Diffstat (limited to 'libclc')
-rw-r--r-- | libclc/CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt index 21e5cac..8750a65 100644 --- a/libclc/CMakeLists.txt +++ b/libclc/CMakeLists.txt @@ -122,7 +122,11 @@ set(LLVM_LINK_COMPONENTS IRReader Support ) -add_llvm_utility( prepare_builtins utils/prepare-builtins.cpp ) +if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) + add_llvm_executable( prepare_builtins utils/prepare-builtins.cpp ) +else() + add_llvm_utility( prepare_builtins utils/prepare-builtins.cpp ) +endif() target_compile_definitions( prepare_builtins PRIVATE ${LLVM_VERSION_DEFINE} ) # These were not properly reported in early LLVM and we don't need them target_compile_options( prepare_builtins PRIVATE -fno-rtti -fno-exceptions ) |