-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Deprecate the use of LLVM_ENABLE_PROJECTS
for compiler-rt
#124012
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
Comments
…RUNTIMES We plan to make this a hard error in the LLVM 21 release. Link llvm#124012
Build failure here when choosing compiler-rt as runtime. Works a-OK as a project build. inxi --basicSystem: Host: cachyos Kernel: 6.13.0-smol arch: x86_64 bits: 64 Desktop: N/A Distro: CachyOS Machine: Type: Desktop System: ASRock product: B650M-HDV/M.2 v: N/A serial: Mobo: ASRock model: B650M-HDV/M.2 serial: UEFI: American Megatrends LLC. v: 3.15 date: 12/10/2024 CPU: Info: 12-core AMD Ryzen 9 7900X [MT MCP] speed (MHz): avg: 3431 min/max: 545/5911 Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Navi 32 [Radeon RX 7700 XT / 7800 XT] driver: amdgpu v: kernel Display: wayland server: X.org v: 1.21.1.15 with: Xwayland v: 21.1.99 driver: X: loaded: modesetting unloaded: vesa dri: radeonsi gpu: amdgpu resolution: 1920x1080~75Hz API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 25.0.0-devel renderer: AMD Radeon RX 7800 XT (radeonsi navi32 ACO DRM 3.59 6.13.0-smol) Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo de: kscreen-console,kscreen-doctor gpu: amdgpu_top, lact, umr wl: wayland-info,wlr-randr x11: xdriinfo, xdpyinfo, xprop, xrandr Network: Device-1: Realtek RTL8125 2.5GbE driver: r8169 Device-2: Sony DualSense wireless controller (PS5) driver: playstation,snd-usb-audio,usbhid type: USB Drives: Local Storage: total: 2.39 TiB used: 1.9 TiB (79.5%) Info: Memory: total: 96 GiB note: est. available: 93.84 GiB used: 8.68 GiB (9.2%) Processes: 528 Uptime: 16h 19m Shell: fish inxi: 3.3.37 Build error[1071/1092] Linking CXX static library /home/deck/.cache/paru/clone/llvm-git/src/_build/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.fuzzer_interceptors.a FAILED: /home/deck/.cache/paru/clone/llvm-git/src/_build/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.fuzzer_interceptors.a : && /usr/bin/cmake -E rm -f /home/deck/.cache/paru/clone/llvm-git/src/_build/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.fuzzer_interceptors.a && /home/deck/.cache/paru/clone/llvm-git/src/_build/bin/llvm-ar Dqc /home/deck/.cache/paru/clone/llvm-git/src/_build/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.fuzzer_interceptors.a compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer_interceptors.x86_64.dir/FuzzerInterceptors.cpp.o && /home/deck/.cache/paru/clone/llvm-git/src/_build/bin/llvm-ranlib -D /home/deck/.cache/paru/clone/llvm-git/src/_build/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.fuzzer_interceptors.a && cd /home/deck/.cache/paru/clone/llvm-git/src/_build/runtimes/runtimes-bins/compiler-rt/lib/fuzzer/cxx_x86_64_merge.dir && /home/deck/.cache/paru/clone/llvm-git/src/_build/bin/clang++ --target=x86_64-pc-linux-gnu -m64 -Wl,--whole-archive /home/deck/.cache/paru/clone/llvm-git/src/_build/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.fuzzer_interceptors.a -Wl,--no-whole-archive /home/deck/.cache/paru/clone/llvm-git/src/_build/runtimes/runtimes-bins/compiler-rt/lib/fuzzer/libcxx_fuzzer_x86_64/lib/libc++.a -r -o fuzzer_interceptors.o && /home/deck/.cache/paru/clone/llvm-git/src/_build/./bin/llvm-objcopy --localize-hidden fuzzer_interceptors.o && /usr/bin/cmake -E remove /home/deck/.cache/paru/clone/llvm-git/src/_build/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.fuzzer_interceptors.a && /home/deck/.cache/paru/clone/llvm-git/src/_build/bin/llvm-ar qcs /home/deck/.cache/paru/clone/llvm-git/src/_build/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.fuzzer_interceptors.a fuzzer_interceptors.o /usr/bin/ld: /home/deck/.cache/paru/clone/llvm-git/src/_build/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.fuzzer_interceptors.a: member /home/deck/.cache/paru/clone/llvm-git/src/_build/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.fuzzer_interceptors.a(FuzzerInterceptors.cpp.o) in archive is not an object CMake build arguments:cmake \ -B _build \ -S "$srcdir"/llvm-project/llvm \ -G Ninja \ -D CMAKE_BUILD_TYPE=Release \ -D CMAKE_INSTALL_PREFIX=/usr \ -D LLVM_BINUTILS_INCDIR=/usr/include \ -D LLVM_APPEND_VC_REV=ON \ -D LLVM_VERSION_SUFFIX="" \ -D LLVM_DEFAULT_TARGET_TRIPLE="x86_64-pc-linux-gnu" \ -D LLVM_TARGETS_TO_BUILD="X86;AMDGPU;BPF;AArch64;ARM;WebAssembly;SPIRV" \ -D BOLT_TARGETS_TO_BUILD="X86;AArch64" \ -D LLVM_HOST_TRIPLE=$CHOST \ -D LLVM_LINK_LLVM_DYLIB=ON \ -D LLVM_ENABLE_RTTI=ON \ -D FFI_INCLUDE_DIR:PATH="$(pkg-config --variable=includedir libffi)" \ -D LLVM_BUILD_LLVM_DYLIB=ON \ -D LLVM_ENABLE_FFI=ON \ -D LLVM_INSTALL_UTILS=ON \ -D LLVM_BUILD_DOCS=ON \ -D LLVM_ENABLE_DOXYGEN=OFF \ -D LLVM_ENABLE_SPHINX=ON \ -D SPHINX_OUTPUT_HTML:BOOL=OFF \ -D SPHINX_WARNINGS_AS_ERRORS=OFF \ -D LLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind;offload;openmp;compiler-rt" \ -D LLVM_ENABLE_PROJECTS="llvm;polly;lldb;lld;clang-tools-extra;clang;bolt;mlir" \ -D LLVM_LIT_ARGS="-sv --ignore-fail" \ -D LLVM_ENABLE_DUMP=ON \ -Wno-dev FLAGS:CFLAGS="-Wno-unused-command-line-argument -flto=full -mtune=znver4 -march=znver4 -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-protector-all --param=ssp-buffer-size=4 -fcf-protection -fno-semantic-interposition -mllvm -polly -fwhole-program-vtables -pthread -fopenmp -mllvm -polly-parallel-force -mllvm -polly-omp-backend=LLVM -mllvm -polly-num-threads=24 -mllvm -polly-vectorizer=stripmine -mllvm -polly-position=before-vectorizer -fopenmp-extensions -foptimize-sibling-calls -funroll-loops -fslp-vectorize -fvectorize -mllvm -polly-reschedule -mllvm -polly-tc-opt -mllvm -polly-tiling -mllvm -polly-2nd-level-tiling -mllvm -polly-matmul-opt -mllvm -polly-optimized-scops -mllvm -polly-pattern-matching-based-opts -mllvm -polly-postopts -mllvm -polly-register-tiling -ffp-contract=fast -fbinutils-version=2.43 -fveclib=AMDLIBM -fstrict-enums -fstrict-aliasing -fopenmp -fopenmp-extensions" CXXFLAGS="-Wno-unused-command-line-argument -flto=full -mtune=znver4 -march=znver4 -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-protector-all --param=ssp-buffer-size=4 -fcf-protection -fno-semantic-interposition -mllvm -polly -fwhole-program-vtables -pthread -fopenmp -mllvm -polly-parallel-force -mllvm -polly-omp-backend=LLVM -mllvm -polly-num-threads=24 -mllvm -polly-vectorizer=stripmine -mllvm -polly-position=before-vectorizer -fopenmp-extensions -foptimize-sibling-calls -funroll-loops -fslp-vectorize -fvectorize -mllvm -polly-reschedule -mllvm -polly-tc-opt -mllvm -polly-tiling -mllvm -polly-2nd-level-tiling -mllvm -polly-matmul-opt -mllvm -polly-optimized-scops -mllvm -polly-pattern-matching-based-opts -mllvm -polly-postopts -mllvm -polly-register-tiling -ffp-contract=fast -fbinutils-version=2.43 -fveclib=AMDLIBM -Wp,-D_GLIBCXX_ASSERTIONS -fstrict-enums -fstrict-aliasing -fopenmp -fopenmp-extensions" LDFLAGS="-v -fuse-ld=lld -Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now,--threads=24,-z,pack-relative-relocs,--lto-O3,--lto-CGO3,-lpthread,--icf=safe,--ignore-data-address-equality,-z,stack-size=8192,-lomp,-lpthread" |
When doing a runtimes build, the |
Found my issue. It was LTO... Full LTO enforced on the C[XX]FLAGS level on the LLVM build with compiler-rt as runtime hard fails, unless -ffat-lto-objects is passed. |
@KyunLFA I doubt you just want to pass Do note that there is some support int he CMake for building the toolchain and runtimes with LTO and FatLTO. |
We should deprecate the use of
LLVM_ENABLE_PROJECTS
for compiler-rt in favor ofLLVM_ENABLE_RUNTIMES
which would greatly simplify the build and allow improvements that are currently not possible.The text was updated successfully, but these errors were encountered: