[PATCH] D118556: [BOLT][TEST] Fix building some tests with clang-14 by passing -no-pie

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 29 23:49:21 PST 2022


Amir created this revision.
Amir added reviewers: maksfb, rafauler, yota9.
Herald added a subscriber: ayermolo.
Amir requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118556

Files:
  bolt/test/X86/exceptions-args.test
  bolt/test/X86/shrinkwrapping.test
  bolt/test/X86/unreachable.test
  bolt/test/X86/vararg.test
  bolt/test/runtime/X86/exceptions-instrumentation.test
  bolt/test/runtime/fptr.test


Index: bolt/test/runtime/fptr.test
===================================================================
--- bolt/test/runtime/fptr.test
+++ bolt/test/runtime/fptr.test
@@ -1,6 +1,6 @@
 # Make sure BOLT correctly updates values based on function pointer.
 
-RUN: %clang %p/Inputs/fptr.c -Wl,-q -o %t.exe
+RUN: %clang %cflags %p/Inputs/fptr.c -Wl,-q -o %t.exe
 RUN: llvm-bolt %t.exe -o %t -lite=0
 RUN: %t | FileCheck %s
 
Index: bolt/test/runtime/X86/exceptions-instrumentation.test
===================================================================
--- bolt/test/runtime/X86/exceptions-instrumentation.test
+++ bolt/test/runtime/X86/exceptions-instrumentation.test
@@ -2,7 +2,7 @@
 
 REQUIRES: system-linux
 
-RUN: %clangxx %p/Inputs/exceptions_split.cpp -Wl,-q -g -o %t_exc_split
+RUN: %clangxx %cxxflags %p/Inputs/exceptions_split.cpp -Wl,-q -g -o %t_exc_split
 RUN: llvm-bolt %t_exc_split -o %t.exc -instrument -instrumentation-file=%t.fdata
 
 RUN: %t.exc arg1 arg2 arg3
Index: bolt/test/X86/vararg.test
===================================================================
--- bolt/test/X86/vararg.test
+++ bolt/test/X86/vararg.test
@@ -4,7 +4,7 @@
 
 REQUIRES: x86_64-linux
 
-RUN: %clangxx %p/../Inputs/vararg.s -o %t -Wl,-q
+RUN: %clangxx %cxxflags %p/../Inputs/vararg.s -o %t -Wl,-q
 RUN: llvm-bolt %t -o /dev/null -print-cfg -print-only=.*printf.* |& FileCheck %s
 
 CHECK: IsSimple    : 0
Index: bolt/test/X86/unreachable.test
===================================================================
--- bolt/test/X86/unreachable.test
+++ bolt/test/X86/unreachable.test
@@ -1,6 +1,6 @@
 # Check unreachable code elimination
 
-RUN: %clangxx %p/Inputs/unreachable.s -o %t.exe
+RUN: %clangxx %cxxflags %p/Inputs/unreachable.s -o %t.exe
 RUN: llvm-bolt %t.exe -o %t \
 RUN:   -reorder-blocks=none -split-functions=1 -eliminate-unreachable \
 RUN:   -funcs=foo -use-gnu-stack -print-cfg -print-finalized \
Index: bolt/test/X86/shrinkwrapping.test
===================================================================
--- bolt/test/X86/shrinkwrapping.test
+++ bolt/test/X86/shrinkwrapping.test
@@ -2,7 +2,7 @@
 # shrink-wrapping when optimizing a function without
 # frame pointers.
 
-RUN: %clangxx -O3 %S/Inputs/exc4sw.S -o %t.exe -Wl,-q
+RUN: %clangxx %cxxflags %S/Inputs/exc4sw.S -o %t.exe -Wl,-q
 RUN: llvm-bolt %t.exe -o %t -relocs -frame-opt=all \
 RUN:   -data=%p/Inputs/exc4sw.fdata -reorder-blocks=cache 2>&1 | \
 RUN:   FileCheck %s --check-prefix=CHECK-BOLT
Index: bolt/test/X86/exceptions-args.test
===================================================================
--- bolt/test/X86/exceptions-args.test
+++ bolt/test/X86/exceptions-args.test
@@ -1,7 +1,7 @@
 # Check that we handle GNU_args_size correctly.
 # It is generated for throwing functions with LP that have parameters on stack.
 
-RUN: %clangxx %p/Inputs/exc_args.s -o %t
+RUN: %clangxx %cxxflags %p/Inputs/exc_args.s -o %t
 RUN: llvm-bolt %t -o /dev/null -print-finalized -print-only=main | FileCheck %s
 
 CHECK: Binary Function "main" after finalize-functions


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118556.404345.patch
Type: text/x-patch
Size: 3036 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220130/19c0bf80/attachment.bin>


More information about the llvm-commits mailing list