[libc++] Move handling of the target triple to the DSL
This fixes a long standing issue where the triple is not always set
consistently in all configurations. This change also moves the
back-deployment Lit features to using the proper target triple
instead of using something ad-hoc.
This will be necessary for using from scratch Lit configuration files
in both normal testing and back-deployment testing.
Differential Revision: https://reviews.llvm.org/D102012
GitOrigin-RevId: 74d096e5587969e0d1458ea2175515f6f02e7df3
diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in
index cb2e087..14fabce 100644
--- a/test/lit.site.cfg.in
+++ b/test/lit.site.cfg.in
@@ -24,7 +24,8 @@
config.enable_shared = @LIBCXX_ENABLE_SHARED@
config.arm_ehabi = @LIBUNWIND_USES_ARM_EHABI@
config.host_triple = "@LLVM_HOST_TRIPLE@"
-config.target_triple = "@TARGET_TRIPLE@"
+if "@TARGET_TRIPLE@":
+ config.target_triple = "@TARGET_TRIPLE@"
config.sysroot = "@LIBUNWIND_SYSROOT@"
config.gcc_toolchain = "@LIBUNWIND_GCC_TOOLCHAIN@"
config.cxx_ext_threads = @LIBUNWIND_BUILD_EXTERNAL_THREAD_LIBRARY@