Repository navigation
release/22.x: build: adjust LLDB and clang library naming on Windows (#185084) - #197493
Conversation
|
@mstorsjo What do you think about merging this PR to the release branch? |
|
@llvm/pr-subscribers-lldb Author: llvmbot ChangesBackport 687e66c Requested by: @charles-zablit Full diff: https://github.com/llvm/llvm-project/pull/197493.diff 2 Files Affected:
diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt
index b0105f5a5f79f..19011c8a64096 100644
--- a/clang/tools/libclang/CMakeLists.txt
+++ b/clang/tools/libclang/CMakeLists.txt
@@ -120,7 +120,7 @@ if (MSVC AND ENABLE_SHARED AND ENABLE_STATIC)
unset(ENABLE_STATIC)
endif()
-if(MSVC)
+if(WIN32 AND NOT MINGW)
set(output_name "libclang")
else()
set(output_name "clang")
diff --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt
index e27f90f2e873d..186f3b3b65299 100644
--- a/lldb/source/API/CMakeLists.txt
+++ b/lldb/source/API/CMakeLists.txt
@@ -265,7 +265,7 @@ elseif (LLDB_EXPORT_ALL_SYMBOLS)
add_llvm_symbol_exports(liblldb ${exported_symbol_file})
endif()
-if (NOT MSVC)
+if(NOT WIN32 OR MINGW)
set_target_properties(liblldb
PROPERTIES
OUTPUT_NAME lldb
|
|
I don't think this meets the criteria for backports to the 22.x branch at this point. From my reading of the bug, it seems this can easily be worked around by renaming the produced binary? Is that not the case? |
|
I'm not sure how possible it is to work around it or not, but I'm quite sure the fix is very safe and very localized, so I would argue that there is no risk involved in backporting it. It's sad if it still falls outside of the backport criteria despite that... |
It can be worked around that way yes. Wouldn't this still count as a build failure when building lldb, even if there is a manual workaround for it? |
That's true. When did it start failing? Or has it always failed in this way? |
I assume it's been this way for a while. The lldb build bots use MSVC instead of clang, just like the release builds. This could have only been caught by a maintainer trying to build with clang, or an end user trying to build from source using clang (which is how we found this issue in the first place). |
Also, if building with This configuration is tricky because it doesn't set the |
Ensure that use of the GNU driver does not change the library name on Windows. We would check the build tools being MSVC rather than targeting Windows to select the output name. (cherry picked from commit 687e66c)
|
I spoke to Doug, it's a small low-risk localized fix so we're happy, I've landed it. |
Backport 687e66c
Requested by: @charles-zablit