Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9b5ea37

Browse files
androm3dac-rhodes
authored andcommitted
[hexagon] Add dylib cmake + toolchain_only (llvm#177247)
The toolchains take up much less space when we enable dylib, so let's create an option to build them that way. Also: TOOLCHAIN_ONLY was ineffective in hexagon-unknown-linux-musl-clang-cross.cmake because cmake takes the first setting from hexagon-unknown-linux-musl-clang.cmake with precedence. FORCE it to fix that issue. Signed-off-by: Brian Cain <[email protected]> (cherry picked from commit cf4ce38)
1 parent cd09c2f commit 9b5ea37

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

clang/cmake/caches/hexagon-unknown-linux-musl-clang-cross.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@ set(CLANG_LINKS_TO_CREATE
1515
clang-cpp
1616
CACHE STRING "")
1717

18-
set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "")
18+
# Note: FORCE is required to override the OFF setting in hexagon-unknown-linux-musl-clang.cmake
19+
# which is loaded earlier in the -C chain.
20+
set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "" FORCE)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
set(LLVM_BUILD_LLVM_DYLIB ON CACHE BOOL "")
2+
set(LLVM_LINK_LLVM_DYLIB ON CACHE BOOL "")
3+
set(CLANG_LINK_LLVM_DYLIB ON CACHE BOOL "")
4+
5+
# Clear version suffix to prevent versioned library names like libLLVM.so.22.1-rc1
6+
# which lld doesn't recognize. This results in libLLVM.so.22.1 instead.
7+
set(LLVM_VERSION_SUFFIX "" CACHE STRING "")

0 commit comments

Comments
 (0)