-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[Clang][CMake][MSVC] Install PDBs alongside executables #126675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-clang @llvm/pr-subscribers-platform-windows Author: Miguel A. Arroyo (mayanez) Changes
Full diff: https://github.com/llvm/llvm-project/pull/126675.diff 1 Files Affected:
diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake
index cdc8bd5cd503b4f..02f26b6d861ad00 100644
--- a/clang/cmake/modules/AddClang.cmake
+++ b/clang/cmake/modules/AddClang.cmake
@@ -138,6 +138,10 @@ macro(add_clang_library name)
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+ if (LLVM_ENABLE_PDB)
+ install(FILES $<TARGET_PDB_FILE:${name}> DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name} OPTIONAL)
+ endif()
+
if (NOT LLVM_ENABLE_IDE)
add_llvm_install_targets(install-${lib}
DEPENDS ${lib}
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/22611 Here is the relevant piece of the build log for the reference
|
Also this one is broken https://lab.llvm.org/buildbot/#/builders/107/builds/7929 |
)" This reverts commit acd34d9.
I have reverted the commit. Error: I will open a new PR with the fix. |
…ables" (#126934) Reverts llvm/llvm-project#126675 Broke the following: https://lab.llvm.org/buildbot/#/builders/107/builds/7929
* Follows up on llvm#120683 enabling PDBs for `clang`.
* Follows up on llvm#120683 enabling PDBs for `clang`.
* Follows up on llvm#120683 enabling PDBs for `clang`.
Fixes the changes introduced in #126675 and subsequently reverted by #126934 . Originally, I mistakenly put the `install` in the wrong location (should have been in the `add_clang_tool` macro) which slipped through testing. I've verified locally using the same CMake configure options. For reference: * **CMake Configure** ``` cmake -B build -S llvm -GNinja -DLLVM_ENABLE_PROJECTS="llvm;clang;lld;compiler-rt" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PDB=ON -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl ``` * **Error** ``` TARGET_PDB_FILE is allowed only for targets with linker created artifacts. ```
…126961) Fixes the changes introduced in llvm/llvm-project#126675 and subsequently reverted by llvm/llvm-project#126934 . Originally, I mistakenly put the `install` in the wrong location (should have been in the `add_clang_tool` macro) which slipped through testing. I've verified locally using the same CMake configure options. For reference: * **CMake Configure** ``` cmake -B build -S llvm -GNinja -DLLVM_ENABLE_PROJECTS="llvm;clang;lld;compiler-rt" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PDB=ON -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl ``` * **Error** ``` TARGET_PDB_FILE is allowed only for targets with linker created artifacts. ```
Fixes the changes introduced in llvm#126675 and subsequently reverted by llvm#126934 . Originally, I mistakenly put the `install` in the wrong location (should have been in the `add_clang_tool` macro) which slipped through testing. I've verified locally using the same CMake configure options. For reference: * **CMake Configure** ``` cmake -B build -S llvm -GNinja -DLLVM_ENABLE_PROJECTS="llvm;clang;lld;compiler-rt" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PDB=ON -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl ``` * **Error** ``` TARGET_PDB_FILE is allowed only for targets with linker created artifacts. ```
clang
.