llvmPackages_{12,13,14,15,16,17,git}.libcxx: add LIBCXXABI_COMPILER_RT flag#297650
Merged
1 commit merged intomasterfrom Mar 21, 2024
unknown repository
Merged
llvmPackages_{12,13,14,15,16,17,git}.libcxx: add LIBCXXABI_COMPILER_RT flag#2976501 commit merged intomasterfrom unknown repository
1 commit merged intomasterfrom
unknown repository
Conversation
…ER_RT=ON since #292043 libcxxabi is built using the same compiler wrapper as libcxx and thus uses the `-rtlib=compiler-rt`. Adding the `LIBCXXABI_USE_COMPILER_RT=ON` at build time ensures that the compiler-rt libraries provided at link time resolving symbol errors for aarch64 pkgLLVM.libcxx build https://hydra.nixos.org/build/253162977
This pull request was closed.
This file contains hidden or 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
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.
Description of changes
fix for aarch64-linux pkgLLVM.libcxx
https://hydra.nixos.org/build/253162977
when building
pkgsLLVM.stdenvon aarch64-linux the build fails when building libcxxabi due to the undefined symbolssetting the cmake flag
LIBCXXABI_COMPILER_RT=ONadds compiler-rt to the link step. note that for libcxx we already set the flagLIBCXX_COMPILER_RT=ON.https://clang.llvm.org/docs/Toolchain.html#compiler-rt-llvm
change #292043 merged libcxx and libcxxabi builds and thus libcxxabi is now getting compiled with the
-rtlib=compiler-rtflag. This flag uses the clang runtime functions and thus needs to link with the their implementation, which is whatLIBCXXABI_COMPILER_RT=ONdoes. when compiled without-rtlib=compiler-rton aarch64 it seems that clang just inlines the implementation so no function call is required. Whencompiler-rtlibraries are available the optimizer decides that a function call is preferable to inlining.testing:
llvm14 fails building libunwind, which is a per-existing issue.
llvmgit fails while building compiler-rt
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.