[llvm] [llvm][CMake] Fix llvm shared library when using ninja multi config (PR #65451)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 24 12:52:14 PDT 2023
================
@@ -41,9 +41,22 @@ if(LLVM_BUILD_LLVM_DYLIB)
OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")
OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "Android")
OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")) # FIXME: It should be "GNU ld for elf"
- configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/simple_version_script.map.in
- ${LLVM_LIBRARY_DIR}/tools/llvm-shlib/simple_version_script.map)
+
+ if(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
----------------
MaskRay wrote:
Generally we prefer
```
if (...) {
} else {
}
```
over
```
if (!...) {
} else {
}
```
CMake is similar.
https://github.com/llvm/llvm-project/pull/65451
More information about the llvm-commits
mailing list