diff options
author | Maksim Panchenko <maks@fb.com> | 2022-04-02 02:43:21 +0300 |
---|---|---|
committer | Maksim Panchenko <maks@fb.com> | 2022-04-02 03:10:47 +0300 |
commit | 5679a3ce876696422717e2a4233acdb7719f0108 (patch) | |
tree | 313547a26fa0da92cae36dace20d523d08eaa7f2 /bolt | |
parent | e24f5348798605a799c63ff09169d177d262cd37 (diff) |
[BOLT][test] Fix AArch64 cross-platform tests
Use target-specific flags for building AArch64 non-runnable tests.
Reviewed By: yota9
Differential Revision: https://reviews.llvm.org/D122520
Diffstat (limited to 'bolt')
-rw-r--r-- | bolt/test/AArch64/double_jump.cpp | 2 | ||||
-rw-r--r-- | bolt/test/AArch64/lit.local.cfg | 5 | ||||
-rw-r--r-- | bolt/test/AArch64/tailcall_traps.s | 8 |
3 files changed, 10 insertions, 5 deletions
diff --git a/bolt/test/AArch64/double_jump.cpp b/bolt/test/AArch64/double_jump.cpp index 180b566388ff..1faae9840e09 100644 --- a/bolt/test/AArch64/double_jump.cpp +++ b/bolt/test/AArch64/double_jump.cpp @@ -52,4 +52,4 @@ unsigned long foo(unsigned long count) { return count; } -int main(int argc, const char *argv[]) { return foo(38); } +extern "C" int _start() { return foo(38); } diff --git a/bolt/test/AArch64/lit.local.cfg b/bolt/test/AArch64/lit.local.cfg index b565c79d5045..f3c0e3f6c6f4 100644 --- a/bolt/test/AArch64/lit.local.cfg +++ b/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')) diff --git a/bolt/test/AArch64/tailcall_traps.s b/bolt/test/AArch64/tailcall_traps.s index 2a1535dd86e1..26f0a3916949 100644 --- a/bolt/test/AArch64/tailcall_traps.s +++ b/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 |