Skip to content
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

[CMake] Install LLVMgold.so for LLVM_INSTALL_TOOLCHAIN_ONLY=on #87567

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

MaskRay
Copy link
Member

@MaskRay MaskRay commented Apr 3, 2024

LLVMgold.so can be used with GNU ar, gold, ld, and nm to process LLVM
bitcode files. Install it in LLVM_INSTALL_TOOLCHAIN_ONLY=on builds like
we install libLTO.so.

Suggested by @emelife

Fix #84271

LLVMgold.so can be used with GNU ar, gold, ld, and nm to process LLVM
bitcode files. Install it in LLVM_INSTALL_TOOLCHAIN_ONLY=on builds like
we install libLTO.so.

Suggested by @emelife

Fix llvm#84271
@MaskRay MaskRay requested a review from thesamesam April 3, 2024 22:26
@llvmbot llvmbot added the LTO Link time optimization (regular/full LTO or ThinLTO) label Apr 3, 2024
@MaskRay MaskRay requested review from mgorny and tstellar April 3, 2024 22:26
@llvmbot
Copy link
Member

llvmbot commented Apr 3, 2024

@llvm/pr-subscribers-lto

Author: Fangrui Song (MaskRay)

Changes

LLVMgold.so can be used with GNU ar, gold, ld, and nm to process LLVM
bitcode files. Install it in LLVM_INSTALL_TOOLCHAIN_ONLY=on builds like
we install libLTO.so.

Suggested by @emelife

Fix #84271


Full diff: https://github.com/llvm/llvm-project/pull/87567.diff

1 Files Affected:

  • (modified) llvm/tools/gold/CMakeLists.txt (+1-1)
diff --git a/llvm/tools/gold/CMakeLists.txt b/llvm/tools/gold/CMakeLists.txt
index 58b323805c7ddac..5c78529e38f48aa 100644
--- a/llvm/tools/gold/CMakeLists.txt
+++ b/llvm/tools/gold/CMakeLists.txt
@@ -12,7 +12,7 @@ if( LLVM_ENABLE_PIC AND LLVM_BINUTILS_INCDIR )
      TargetParser
      )
 
-  add_llvm_library(LLVMgold MODULE
+  add_llvm_library(LLVMgold MODULE INSTALL_WITH_TOOLCHAIN
     gold-plugin.cpp
     )
 

Copy link
Collaborator

@sylvestre sylvestre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MaskRay MaskRay merged commit b9ec4ab into llvm:main Apr 4, 2024
5 of 6 checks passed
@MaskRay MaskRay deleted the cmake-gold branch April 4, 2024 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTO Link time optimization (regular/full LTO or ThinLTO)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LLVMgold.so doesn't be copied to lib directory when make-install
3 participants