[PATCH] D122520: [BOLT][test] Fix AArch64 cross-platform tests
Maksim Panchenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 1 17:11:20 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5679a3ce8766: [BOLT][test] Fix AArch64 cross-platform tests (authored by maksfb).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122520/new/
https://reviews.llvm.org/D122520
Files:
bolt/test/AArch64/double_jump.cpp
bolt/test/AArch64/lit.local.cfg
bolt/test/AArch64/tailcall_traps.s
Index: bolt/test/AArch64/tailcall_traps.s
===================================================================
--- bolt/test/AArch64/tailcall_traps.s
+++ bolt/test/AArch64/tailcall_traps.s
@@ -17,12 +17,12 @@
.text
.align 4
- .global main
- .type main, %function
-main:
+ .global _start
+ .type _start, %function
+_start:
nop
ret
- .size main, .-main
+ .size _start, .-_start
.global foo
.type foo, %function
Index: bolt/test/AArch64/lit.local.cfg
===================================================================
--- bolt/test/AArch64/lit.local.cfg
+++ bolt/test/AArch64/lit.local.cfg
@@ -1,2 +1,7 @@
if config.host_arch not in ['aarch64']:
config.unsupported = True
+
+config.substitutions.insert(
+ 0, ('%cflags',
+ '%cflags --target=aarch64-pc-linux -nostartfiles -nostdlib -fuse-ld=lld'
+ ' -Wl,--unresolved-symbols=ignore-all'))
Index: bolt/test/AArch64/double_jump.cpp
===================================================================
--- bolt/test/AArch64/double_jump.cpp
+++ bolt/test/AArch64/double_jump.cpp
@@ -52,4 +52,4 @@
return count;
}
-int main(int argc, const char *argv[]) { return foo(38); }
+extern "C" int _start() { return foo(38); }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122520.419897.patch
Type: text/x-patch
Size: 1217 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220402/0f3bdf86/attachment.bin>
More information about the llvm-commits
mailing list