[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
This commit is contained in:
Maksim Panchenko 2022-04-01 16:43:21 -07:00
parent e24f534879
commit 5679a3ce87
3 changed files with 10 additions and 5 deletions

View File

@ -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); }

View File

@ -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'))

View File

@ -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