From 1f84bdeac2dfb2c9ac4eef586ee154438facaebc Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 9 Mar 2026 14:21:00 +0100 Subject: [PATCH] [BOLT] Fix test with -DCLANG_DEFAULT_PIE_ON_LINUX=OFF (#185047) Use `%cxxflags`, so that `-fPIE -pie` get passed in order to ensure the test behavior is the same regardless of cmake configuration. We do similar in many other BOLT tests. --- bolt/test/max-funcs.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bolt/test/max-funcs.test b/bolt/test/max-funcs.test index c7cd7be12476..f83a2a4caae9 100644 --- a/bolt/test/max-funcs.test +++ b/bolt/test/max-funcs.test @@ -3,7 +3,7 @@ REQUIRES: system-linux -RUN: %clangxx %p/Inputs/bolt_icf.cpp -g -Wl,-q -o %t.exe +RUN: %clangxx %cxxflags %p/Inputs/bolt_icf.cpp -g -Wl,-q -o %t.exe RUN: llvm-bolt %t.exe --relocs -o %t --max-funcs=2 RUN: llvm-objdump -d -j .text %t | FileCheck %s