From 7f7cd6e921685b1b424175375cc791c2014d2d40 Mon Sep 17 00:00:00 2001 From: clubby789 Date: Mon, 23 Dec 2024 14:53:09 +0000 Subject: [PATCH] Add LTO support to clang in CI --- src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile | 2 ++ src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh | 1 + 2 files changed, 3 insertions(+) diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile index e857f38e68a85..e240fae3e8edc 100644 --- a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile @@ -104,3 +104,5 @@ ENV DIST_SRC 1 ENV LIBCURL_NO_PKG_CONFIG 1 ENV DIST_REQUIRE_ALL_TOOLS 1 + +ENV LD_PRELOAD=/rustroot/lib64/libstdc++.so.6 diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh index 2e08c87f278c0..f96b66880bd5d 100755 --- a/src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh +++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh @@ -39,6 +39,7 @@ hide_output \ -DLLVM_INCLUDE_TESTS=OFF \ -DLLVM_INCLUDE_EXAMPLES=OFF \ -DLLVM_ENABLE_PROJECTS="clang;lld;compiler-rt;bolt" \ + -DLLVM_BINUTILS_INCDIR="/rustroot/lib/gcc/x86_64-pc-linux-gnu/9.5.0/plugin/include/" \ -DC_INCLUDE_DIRS="$INC" hide_output make -j$(nproc)