[llvm] [CI] Disable PIE on Linux Premerge Builds (PR #154584)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 20 10:47:45 PDT 2025


https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/154584

We do not gain any additional security from having PIE on the test binaries, and this does have an impact on test times. It is about 10% from my measurements. Not as much as previous reports (https://reviews.llvm.org/D140880), but still significant. This is a similar gain to finish enabling the lit internal shell, which will take significantly more effort. I also do not think this is a meaningful enough difference from the "default" configuration to keep it the default, especially given the option is mostly set by distros.

>From 2bed5be4a56e5666885b0ce5ee557b811282f96c Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Wed, 20 Aug 2025 17:44:42 +0000
Subject: [PATCH] [CI] Disable PIE on Linux Premerge Builds

We do not gain any additional security from having PIE on the test
binaries, and this does have an impact on test times. It is about 10%
from my measurements. Not as much as previous reports
(https://reviews.llvm.org/D140880), but still significant. This is a
similar gain to finish enabling the lit internal shell, which will take
significantly more effort.
---
 .ci/monolithic-linux.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh
index 75729b3fd5f6a..3ca4d05f4c891 100755
--- a/.ci/monolithic-linux.sh
+++ b/.ci/monolithic-linux.sh
@@ -60,7 +60,8 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
       -D MLIR_ENABLE_BINDINGS_PYTHON=ON \
       -D LLDB_ENABLE_PYTHON=ON \
       -D LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON \
-      -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
+      -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
+      -D CMAKE_EXE_LINKER_FLAGS="-no-pie"
 
 start-group "ninja"
 



More information about the llvm-commits mailing list