Skip to content

Commit 41b9d28

Browse files
[BOLT][NFC] Using target_triple in lit config (#144078)
1 parent e86740e commit 41b9d28

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

bolt/test/lit.local.cfg

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
host_linux_triple = config.target_triple.split("-")[0] + "-unknown-linux-gnu"
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+
host_triple = host_triple.split("-")[0] + "-unknown-linux-gnu"
6+
27
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}"
8+
flags = f"--target={host_triple} -fPIE {common_linker_flags}"
49

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

0 commit comments

Comments
 (0)