summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bolt/test/AArch64/asm-func-debug.test2
-rw-r--r--bolt/test/AArch64/update-debug-reloc.test2
-rw-r--r--bolt/test/X86/asm-func-debug.test2
-rw-r--r--bolt/test/X86/inline-debug-info.test2
-rw-r--r--bolt/test/X86/inlined-function-mixed.test2
-rw-r--r--bolt/test/keep-aranges.test4
-rw-r--r--bolt/test/lit.cfg.py4
-rw-r--r--bolt/test/non-empty-debug-line.test2
8 files changed, 10 insertions, 10 deletions
diff --git a/bolt/test/AArch64/asm-func-debug.test b/bolt/test/AArch64/asm-func-debug.test
index 57b43904371b..8504eda02615 100644
--- a/bolt/test/AArch64/asm-func-debug.test
+++ b/bolt/test/AArch64/asm-func-debug.test
@@ -3,7 +3,7 @@
#
# The input test case foo() contains nops that we remove.
-RUN: %clang -g %p/../Inputs/asm_foo.s %p/../Inputs/asm_main.c -o %t.exe
+RUN: %clang %cflags -g %p/../Inputs/asm_foo.s %p/../Inputs/asm_main.c -o %t.exe
RUN: llvm-bolt %t.exe -o %t -update-debug-sections
RUN: llvm-dwarfdump -all %t | FileCheck %s
diff --git a/bolt/test/AArch64/update-debug-reloc.test b/bolt/test/AArch64/update-debug-reloc.test
index 88eff91655f5..873a886ae1ee 100644
--- a/bolt/test/AArch64/update-debug-reloc.test
+++ b/bolt/test/AArch64/update-debug-reloc.test
@@ -1,7 +1,7 @@
# Verify that bolt correctly handle AArch64 relocations in case of enabling
# update-debug-sections option.
-RUN: %clang -g %p/../Inputs/asm_foo.s %p/../Inputs/asm_main.c -o %t.exe
+RUN: %clang %cflags -g %p/../Inputs/asm_foo.s %p/../Inputs/asm_main.c -o %t.exe
RUN: llvm-bolt %t.exe -o %t -update-debug-sections
CHECK: BOLT-INFO: Target architecture: aarch64
diff --git a/bolt/test/X86/asm-func-debug.test b/bolt/test/X86/asm-func-debug.test
index a022ff0822b3..959070196971 100644
--- a/bolt/test/X86/asm-func-debug.test
+++ b/bolt/test/X86/asm-func-debug.test
@@ -3,7 +3,7 @@
#
# The input test case foo() contains nops that we remove.
-RUN: %clang -gdwarf-4 %p/../Inputs/asm_foo.s %p/../Inputs/asm_main.c -o %t.exe
+RUN: %clang -g %cflags %p/../Inputs/asm_foo.s %p/../Inputs/asm_main.c -o %t.exe
RUN: llvm-bolt %t.exe -o %t -update-debug-sections
RUN: llvm-dwarfdump -all %t | FileCheck %s
diff --git a/bolt/test/X86/inline-debug-info.test b/bolt/test/X86/inline-debug-info.test
index cab3fb9baa22..300fa0be7891 100644
--- a/bolt/test/X86/inline-debug-info.test
+++ b/bolt/test/X86/inline-debug-info.test
@@ -3,7 +3,7 @@
# REQUIRES: system-linux
-# RUN: %clang %cflags -O1 -gdwarf-4 %p/Inputs/inline-main.c %p/Inputs/inline-foo.c \
+# RUN: %clang %cflags -O1 -g %p/Inputs/inline-main.c %p/Inputs/inline-foo.c \
# RUN: -o %t.exe -Wl,-q
# RUN: llvm-bolt %t.exe -update-debug-sections -print-debug-info \
# RUN: -print-only=main -print-after-lowering -force-inline=foo -o %t.bolt \
diff --git a/bolt/test/X86/inlined-function-mixed.test b/bolt/test/X86/inlined-function-mixed.test
index d2ed274ae6cc..5b35496e85ee 100644
--- a/bolt/test/X86/inlined-function-mixed.test
+++ b/bolt/test/X86/inlined-function-mixed.test
@@ -2,7 +2,7 @@
# debug info does not cause a crash.
RUN: %clangxx %S/Inputs/inlined.cpp -c -o %T/inlined.o
-RUN: %clangxx %S/Inputs/inlinee.cpp -c -o %T/inlinee.o -gdwarf-4
+RUN: %clangxx %cxxflags %S/Inputs/inlinee.cpp -c -o %T/inlinee.o -g
RUN: %clangxx %T/inlined.o %T/inlinee.o -o %t
RUN: llvm-bolt %t -o %t.bolt -update-debug-sections -reorder-blocks=reverse \
diff --git a/bolt/test/keep-aranges.test b/bolt/test/keep-aranges.test
index bd3368600504..ada08b54f010 100644
--- a/bolt/test/keep-aranges.test
+++ b/bolt/test/keep-aranges.test
@@ -3,8 +3,8 @@
REQUIRES: system-linux
-RUN: %clang %S/Inputs/icf_baz.c %S/Inputs/icf_main.c -Wl,--icf=all,--gdb-index \
-RUN: -gdwarf-4 -o %t.exe -fuse-ld=lld
+RUN: %clang %cflags %S/Inputs/icf_baz.c %S/Inputs/icf_main.c -Wl,--icf=all,--gdb-index \
+RUN: -g -o %t.exe -fuse-ld=lld
RUN: llvm-bolt %t.exe -o %t -update-debug-sections -keep-aranges
RUN: llvm-dwarfdump -debug-aranges %t | FileCheck %s
diff --git a/bolt/test/lit.cfg.py b/bolt/test/lit.cfg.py
index 0d8583c6f714..68b4fc2a247e 100644
--- a/bolt/test/lit.cfg.py
+++ b/bolt/test/lit.cfg.py
@@ -60,8 +60,8 @@ llvm_config.config.environment['LLD'] = config.bolt_lld
llvm_config.use_clang()
llvm_config.use_llvm_tool('lld', required=True, search_env='LLD')
-config.substitutions.append(('%cflags', '-no-pie'))
-config.substitutions.append(('%cxxflags', '-no-pie'))
+config.substitutions.append(('%cflags', '-no-pie -gdwarf-4'))
+config.substitutions.append(('%cxxflags', '-no-pie -gdwarf-4'))
link_fdata_cmd = os.path.join(config.test_source_root, 'link_fdata.py')
diff --git a/bolt/test/non-empty-debug-line.test b/bolt/test/non-empty-debug-line.test
index 677efe319bba..50c215ab91d1 100644
--- a/bolt/test/non-empty-debug-line.test
+++ b/bolt/test/non-empty-debug-line.test
@@ -3,7 +3,7 @@
REQUIRES: system-linux
-RUN: %clang %S/Inputs/hello.c -gdwarf-4 -o %t
+RUN: %clang %cflags %S/Inputs/hello.c -g -o %t
RUN: llvm-bolt %t -o %t1 -update-debug-sections -funcs=_start
RUN: llvm-readobj -S %t > %t2
RUN: llvm-readobj -S %t1 >> %t2