forked from OSchip/llvm-project
[PR] Fix tests build with -no-pie option
Summary: Since gcc/ld could produce and expect PIE files we need to pass -no-pie option to avoid linking errors for tests. Vladislav Khmelevsky, Advanced Software Technology Lab, Huawei (cherry picked from FBD28360045)
This commit is contained in:
parent
ce84e9607a
commit
de298c08fd
|
@ -7,7 +7,7 @@
|
|||
# RUN: %s -o %t.o
|
||||
# RUN: link_fdata %s %t.o %t.fdata
|
||||
# RUN: llvm-strip --strip-unneeded %t.o
|
||||
# RUN: %host_cc %t.o -o %t.exe -Wl,-q -nostdlib
|
||||
# RUN: %host_cc %cflags %t.o -o %t.exe -Wl,-q -nostdlib
|
||||
# RUN: llvm-bolt %t.exe -o %t.out -data %t.fdata -lite=0 -dyno-stats \
|
||||
# RUN: -print-sctc 2>&1 | FileCheck %s
|
||||
# CHECK-NOT: Assertion `BranchInfo.size() == 2 && "could only be called for blocks with 2 successors"' failed.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# RUN: %p/Inputs/file1.s -o %tfile1.o
|
||||
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
|
||||
# RUN: %p/Inputs/file2.s -o %tfile2.o
|
||||
# RUN: %host_cxx %tmain.o %tfile1.o %tfile2.o -o %t.exe -Wl,-q
|
||||
# RUN: %host_cxx %cxxflags %tmain.o %tfile1.o %tfile2.o -o %t.exe -Wl,-q
|
||||
# RUN: llvm-bolt %t.exe --reorder-blocks=reverse -update-debug-sections -o %t.out
|
||||
# RUN: llvm-dwarfdump --debug-types=0x000005f7 %t.out | grep DW_AT_stmt_list | FileCheck %s --check-prefix=CHECK-OUTPUT
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
|
||||
# RUN: %s -o %t.o
|
||||
# RUN: %host_cc %t.o -o %t.exe -Wl,-q
|
||||
# RUN: %host_cc %cflags %t.o -o %t.exe -Wl,-q
|
||||
|
||||
# RUN: llvm-bolt %t.exe -print-cfg \
|
||||
# RUN: -print-only=inc_dup -o %t.out | FileCheck %s
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# RUN: %s -o %t.o
|
||||
# RUN: link_fdata %s %t.o %t.fdata
|
||||
# RUN: llvm-strip --strip-unneeded %t.o
|
||||
# RUN: %host_cc %t.o -o %t.exe -Wl,-q
|
||||
# RUN: %host_cc %cflags %t.o -o %t.exe -Wl,-q
|
||||
# RUN: llvm-bolt %t.exe -relocs=1 -reorder-blocks=cache+ -print-finalized \
|
||||
# RUN: -o %t.out -data %t.fdata | FileCheck %s
|
||||
# RUN: %t.out 1 2 3
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# RUN: %s -o %t.o
|
||||
# RUN: link_fdata %s %t.o %t.fdata
|
||||
# RUN: llvm-strip --strip-unneeded %t.o
|
||||
# RUN: %host_cc %t.o -o %t.exe -Wl,-q
|
||||
# RUN: %host_cc %cflags %t.o -o %t.exe -Wl,-q
|
||||
|
||||
# RUN: llvm-bolt %t.exe -relocs=1 -hot-text -reorder-functions=hfsort \
|
||||
# RUN: -data %t.fdata -o %t.out | FileCheck %s
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
|
||||
# RUN: %s -o %t.o
|
||||
# RUN: %host_cc %t.o -o %t.exe -Wl,-q
|
||||
# RUN: %host_cc %cflags %t.o -o %t.exe -Wl,-q
|
||||
|
||||
# RUN: llvm-bolt %t.exe -instrument -instrumentation-file=%t.fdata \
|
||||
# RUN: -o %t.instrumented
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
|
||||
# RUN: %s -o %t.o
|
||||
# RUN: %host_cc %t.o -o %t.exe -Wl,-q
|
||||
# RUN: %host_cc %cflags %t.o -o %t.exe -Wl,-q
|
||||
|
||||
# RUN: llvm-bolt %t.exe -instrument -instrumentation-file=%t.fdata \
|
||||
# RUN: -o %t.instrumented
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
# REQUIRES: system-linux
|
||||
|
||||
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
|
||||
# RUN: %host_cxx %t.o -o %t.exe -Wl,-q
|
||||
# RUN: %host_cxx %cxxflags %t.o -o %t.exe -Wl,-q
|
||||
# RUN: llvm-bolt %t.exe -o %t.out -dump-dot-all -funcs=main.* 2>&1 | FileCheck %s
|
||||
#
|
||||
# CHECK-NOT: Assertion `isValid()' failed.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
|
||||
# RUN: %s -o %t.o
|
||||
# RUN: %host_cc %t.o -o %t.exe
|
||||
# RUN: %host_cc %cflags %t.o -o %t.exe
|
||||
# RUN: llvm-bolt %t.exe -relocs=0 -jump-tables=move -print-finalized \
|
||||
# RUN: -o %t.out | FileCheck %s
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
|
||||
# RUN: %s -o %t.o
|
||||
# RUN: %host_cc %t.o -o %t.exe -Wl,-q
|
||||
# RUN: %host_cc %cflags %t.o -o %t.exe -Wl,-q
|
||||
# RUN: llvm-bolt %t.exe -relocs -print-cfg -o %t.out \
|
||||
# RUN: | FileCheck %s
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
# RUN: %s -o %t.o
|
||||
# Delete our BB symbols so BOLT doesn't mark them as entry points
|
||||
# RUN: llvm-strip --strip-unneeded %t.o
|
||||
# RUN: %host_cc %t.o -o %t.exe -Wl,-q
|
||||
# RUN: %host_cc %cflags %t.o -o %t.exe -Wl,-q
|
||||
|
||||
# RUN: llvm-bolt %t.exe -relocs=1 -print-finalized -print-only=main -o %t.out
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
# RUN: link_fdata %s %t.o %t.fdata
|
||||
# Delete our BB symbols so BOLT doesn't mark them as entry points
|
||||
# RUN: llvm-strip --strip-unneeded %t.o
|
||||
# RUN: %host_cc %t.o -o %t.exe -Wl,-q
|
||||
# RUN: %host_cc %cflags %t.o -o %t.exe -Wl,-q
|
||||
|
||||
# RUN: llvm-bolt %t.exe -relocs=1 -frame-opt=all -print-finalized \
|
||||
# RUN: -lite=0 -print-only=main -data %t.fdata -o %t.out | FileCheck %s
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# RUN: %s -o %t.o
|
||||
# RUN: link_fdata %s %t.o %t.fdata
|
||||
# RUN: llvm-strip --strip-unneeded %t.o
|
||||
# RUN: %host_cc %t.o -o %t.exe -Wl,-q -nostdlib
|
||||
# RUN: %host_cc %cflags %t.o -o %t.exe -Wl,-q -nostdlib
|
||||
# RUN: llvm-bolt %t.exe -relocs -o %t.out -data %t.fdata \
|
||||
# RUN: -frame-opt=all -simplify-conditional-tail-calls=false \
|
||||
# RUN: -eliminate-unreachable=false
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
|
||||
# RUN: link_fdata %s %t.o %t.fdata
|
||||
# RUN: llvm-strip --strip-unneeded %t.o
|
||||
# RUN: %host_cc %t.o -o %t.exe -Wl,-q -nostdlib
|
||||
# RUN: %host_cc %cflags %t.o -o %t.exe -Wl,-q -nostdlib
|
||||
# RUN: llvm-bolt %t.exe -o %t.out -data %t.fdata -frame-opt=all -lite=0 \
|
||||
# RUN: -print-fop 2>&1 | FileCheck %s
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# RUN: link_fdata %s %t.o %t.fdata
|
||||
# Delete our BB symbols so BOLT doesn't mark them as entry points
|
||||
# RUN: llvm-strip --strip-unneeded %t.o
|
||||
# RUN: %host_cc %t.o -o %t.exe -Wl,-q
|
||||
# RUN: %host_cc %cflags %t.o -o %t.exe -Wl,-q
|
||||
|
||||
# RUN: llvm-bolt %t.exe -relocs=1 -frame-opt=all -print-fop \
|
||||
# RUN: -print-only=main -data %t.fdata -o %t.out | FileCheck %s
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# RUN: link_fdata %s %t.o %t.fdata
|
||||
# Delete our BB symbols so BOLT doesn't mark them as entry points
|
||||
# RUN: llvm-strip --strip-unneeded %t.o
|
||||
# RUN: %host_cc %t.o -o %t.exe -Wl,-q
|
||||
# RUN: %host_cc %cflags %t.o -o %t.exe -Wl,-q
|
||||
|
||||
# RUN: llvm-bolt %t.exe -relocs=1 -frame-opt=all -print-finalized \
|
||||
# RUN: -print-only=main -data %t.fdata -o %t.out | FileCheck %s
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
|
||||
# RUN: llvm-strip --strip-unneeded %t.o
|
||||
# RUN: %host_cc %t.o -o %t.exe -Wl,-q
|
||||
# RUN: %host_cc %cflags %t.o -o %t.exe -Wl,-q
|
||||
# RUN: llvm-bolt %t.exe -o %t.out -lite=0 -v=1 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK-NOT: unclaimed PC-relative relocations left in data
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
|
||||
# RUN: llvm-strip --strip-unneeded %t.o
|
||||
# RUN: %host_cc %t.o -o %t.exe -Wl,-q
|
||||
# RUN: %host_cc %cflags %t.o -o %t.exe -Wl,-q
|
||||
# RUN: llvm-bolt %t.exe -o %t.out -lite=0 -v=1 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK-NOT: unclaimed PC-relative relocations left in data
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
|
||||
# RUN: llvm-strip --strip-unneeded %t.o
|
||||
# RUN: %host_cc %t.o -o %t.exe -Wl,-q
|
||||
# RUN: %host_cc %cflags %t.o -o %t.exe -Wl,-q
|
||||
# RUN: llvm-bolt %t.exe -o %t.out -lite=0 -v=1 2>&1 | FileCheck %s
|
||||
|
||||
# CHECK-NOT: unclaimed PC-relative relocations left in data
|
||||
|
|
|
@ -27,7 +27,7 @@ int main(int argc, char **argv) {
|
|||
/*
|
||||
REQUIRES: system-linux
|
||||
|
||||
RUN: %host_cc %s -o %t.exe -Wl,-q
|
||||
RUN: %host_cc %cflags %s -o %t.exe -Wl,-q
|
||||
|
||||
RUN: llvm-bolt %t.exe -relocs=1 -lite -reorder-functions=user \
|
||||
RUN: -hugify -function-order=%p/Inputs/user_func_order.txt -o %t
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
|
||||
# RUN: %s -o %t.o
|
||||
# RUN: %host_cc %t.o -o %t.exe -Wl,-q
|
||||
# RUN: %host_cc %cflags %t.o -o %t.exe -Wl,-q
|
||||
|
||||
# RUN: llvm-bolt %t.exe -print-cfg \
|
||||
# RUN: -print-only=main -o %t.out | FileCheck %s
|
||||
|
|
|
@ -44,6 +44,9 @@ llvm_config.use_default_substitutions()
|
|||
config.substitutions.append(('%host_cc', config.host_cc))
|
||||
config.substitutions.append(('%host_cxx', config.host_cxx))
|
||||
|
||||
config.substitutions.append(('%cflags', '-no-pie'))
|
||||
config.substitutions.append(('%cxxflags', '-no-pie'))
|
||||
|
||||
tool_dirs = [config.llvm_tools_dir,
|
||||
config.test_source_root]
|
||||
|
||||
|
|
Loading…
Reference in New Issue