[PATCH] D134936: [cmake] Export `LLVM_ENABLE_LTO`.
Carlo Cabrera via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 29 20:26:41 PDT 2022
carlocab created this revision.
carlocab added reviewers: MaskRay, Ericson2314, nikic.
Herald added subscribers: StephenFan, inglorion.
Herald added a project: All.
carlocab requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
LTO builds differ in substantial ways from a standard build of LLVM. In
particular, if the build happens to include static archives, then those
archives will contain LLVM bitcode, which may require special handling.
I'm not aware of an easy way to detect whether LLVM has been built with
LTO. This would be made much simpler if this were exported by
`LLVMConfig`.
For an example where this might be helpful, see:
https://github.com/banach-space/llvm-tutor/commit/af9d1935027ebd61287930f16c0b6ca2fe0845f2
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D134936
Files:
llvm/cmake/modules/LLVMConfig.cmake.in
Index: llvm/cmake/modules/LLVMConfig.cmake.in
===================================================================
--- llvm/cmake/modules/LLVMConfig.cmake.in
+++ llvm/cmake/modules/LLVMConfig.cmake.in
@@ -51,6 +51,8 @@
set(LLVM_ENABLE_EH @LLVM_ENABLE_EH@)
+set(LLVM_ENABLE_LTO @LLVM_ENABLE_LTO@)
+
set(LLVM_ENABLE_FFI @LLVM_ENABLE_FFI@)
if(LLVM_ENABLE_FFI)
find_package(FFI)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134936.464135.patch
Type: text/x-patch
Size: 384 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220930/2f79f58a/attachment.bin>
More information about the llvm-commits
mailing list