Skip to content

Commit 525ee97

Browse files
Addressing reviewers
1 parent 5528456 commit 525ee97

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

bolt/test/lit.local.cfg

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
host_linux_triple = config.target_triple
1+
host_triple = config.target_triple
2+
3+
# Force triple on non-linux hosts to get ELF binaries on all platforms.
4+
if not "linux" in host_triple:
5+
arch = host_triple.split("-")[0]
6+
host_triple = arch+"-unknown-linux-gnu"
7+
28
common_linker_flags = "-fuse-ld=lld -Wl,--unresolved-symbols=ignore-all -Wl,--build-id=none -pie"
3-
flags = f"--target={host_linux_triple} -fPIE {common_linker_flags}"
9+
flags = f"--target={host_triple} -fPIE {common_linker_flags}"
410

511
config.substitutions.insert(0, ("%cflags", f"%cflags {flags}"))
612
config.substitutions.insert(0, ("%cxxflags", f"%cxxflags {flags}"))

0 commit comments

Comments
 (0)