-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
Posix: Make LDC_INSTALL_LTOPLUGIN & LDC_INSTALL_LLVM_RUNTIME_LIBS default to ON if LLVM is linked statically #3673
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…tically And to OFF if LLVM is linked dynamically. As we depend on the LLVM .so anyway in that case, it should be safe to depend on its LTO plugin as well. Use the default value for CI, which means that it's still included by our prebuilt packages (except for FreeBSD) and that the code locating the 'system' LTO plugin is tested for CI jobs using a shared distro LLVM, like Cirrus and Circle CI on Ubuntu and FreeBSD.
As they fail for the Cirrus CI job and FreeBSD 12.1 at least. [The LTO tests on FreeBSD have just been enabled and were previously disabled.]
…G check As they are IMO unfavorably disrupting the output, e.g.: -- -- Building LDC with dynamic compilation support (LDC_DYNAMIC_COMPILE): ON -- -- Building LDC with integrated LLD linker (LDC_WITH_LLD): ON -- -- Building LDC with enabled assertions (LDC_ENABLE_ASSERTIONS): ON -- Performing Test LINKER_ACCEPTS_EXPORT_DYNAMIC_FLAG -- Performing Test LINKER_ACCEPTS_EXPORT_DYNAMIC_FLAG - Success -- -- Building LDC with plugin support (LDC_ENABLE_PLUGINS): ON -- -- Including LTO linker plugin (LDC_INSTALL_LTOPLUGIN): ON (/home/vsts/work/1/llvm/lib/LLVMgold.so) -- -- Including LLVM compiler-rt libraries (LDC_INSTALL_LLVM_RUNTIME_LIBS): ON
6ce6348
to
3e26f37
Compare
@@ -804,12 +812,6 @@ if (LDC_INSTALL_LLVM_RUNTIME_LIBS) | |||
copy_compilerrt_lib("windows/clang_rt.builtins-${compilerrt_arch_suffix}.lib" "ldc_rt.builtins.lib" FALSE) | |||
copy_compilerrt_lib("windows/clang_rt.profile-${compilerrt_arch_suffix}.lib" "ldc_rt.profile.lib" FALSE) | |||
copy_compilerrt_lib("windows/clang_rt.fuzzer-${compilerrt_arch_suffix}.lib" "ldc_rt.fuzzer.lib" FALSE) | |||
copy_compilerrt_lib("windows/clang_rt.xray-${compilerrt_arch_suffix}.lib" "ldc_rt.xray.lib" FALSE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is XRay still not available on Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, sadly not, at least not up to & including v11; I haven't checked 12 yet.
…atically And to OFF if LLVM is linked dynamically. The assumption is that most users choosing a shared LLVM prefer a dependency on the associated clang compiler-rt libs too, and that users of a static LLVM strive for not conflicting with potential other LLVM installations.
… library lookups When looking up the LTO linker plugin and compiler-rt libraries.
Most of them are available. [For ARMv7-A, there are no libs.]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
And to
OFF
if LLVM is linked dynamically. As we depend on the LLVM .so anyway in that case, it should be safe to depend on its LTO plugin and the associated (clang) compiler-rt libraries as well. The assumption is that most users choosing a shared LLVM prefer dependencies over renamed duplicates, and that users of a static LLVM strive for self-sufficiency or at least not conflicting with potential other LLVM installations.Use the default values for CI, which means that linker plugin and compiler-rt libs are still included in our prebuilt packages (except for FreeBSD) and that the code locating non-bundled libraries is tested for CI jobs using a shared distro LLVM, like Cirrus and Circle CI on Ubuntu and FreeBSD. That code had to be extended to include the LLVM lib dir when using a shared LLVM (e.g., the install dir on FreeBSD is
/usr/local/llvm90
). And the constraints for according lit tests have been considerably lowered too, simply assuming the compiler-rt libraries are available somewhere (and that the linker chosen by LDC supports the LTO plugin).