[llvm] [BOLT] Fix a wrong compiler option in test (PR #74420)

via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 4 23:05:32 PST 2023


https://github.com/linsinan1995 created https://github.com/llvm/llvm-project/pull/74420

-nopie is an option for OpenBSD, and other linux distribution might report an error like
`error: unsupported option '-nopie' for target 'aarch64-linux'`


using `-nopie` and `-fpie` together seems to be a mistake, so I changed -nopie to -pie in this patch.

>From 468afc159172e81fbf7d3754cba21860d92e4e10 Mon Sep 17 00:00:00 2001
From: Sinan Lin <sinan.lin at linux.alibaba.com>
Date: Tue, 5 Dec 2023 14:51:23 +0800
Subject: [PATCH] [BOLT] Fix a wrong compiler option in test

---
 bolt/test/runtime/AArch64/instrumentation-ind-call.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bolt/test/runtime/AArch64/instrumentation-ind-call.c b/bolt/test/runtime/AArch64/instrumentation-ind-call.c
index 76ee8c05dd299..51a4a5dff175b 100644
--- a/bolt/test/runtime/AArch64/instrumentation-ind-call.c
+++ b/bolt/test/runtime/AArch64/instrumentation-ind-call.c
@@ -14,7 +14,7 @@ int main() {
 /*
 REQUIRES: system-linux,bolt-runtime
 
-RUN: %clang %cflags %s -o %t.exe -Wl,-q -nopie -fpie
+RUN: %clang %cflags %s -o %t.exe -Wl,-q -pie -fpie
 
 RUN: llvm-bolt %t.exe --instrument --instrumentation-file=%t.fdata \
 RUN:   -o %t.instrumented



More information about the llvm-commits mailing list