From bae325410db0511724e4a2c4d5249df8dacd885f Mon Sep 17 00:00:00 2001 From: "Nadeem, Usman" Date: Tue, 6 May 2025 12:31:38 -0700 Subject: [PATCH] Fix buildbot failure due to triple normalization issues We have been seeing buildbot failures due to https://github.com/llvm/llvm-project/pull/122629 I posted https://github.com/llvm/llvm-project/pull/135571 to update the triple normalization logic, but that patch hasn't gotten any traction. So in this patch I am updating the lit config to use triple from clang's output for `%itanium_abi_triple` substitution, instead of relying on `self.config.target_triple` which might not be in a canonical form. Buildbot failure example: https://lab.llvm.org/buildbot/#/builders/40 Change-Id: Ib9c3425fddac45d7468fad20929fd29358a55e1b --- llvm/utils/lit/lit/llvm/config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/llvm/utils/lit/lit/llvm/config.py b/llvm/utils/lit/lit/llvm/config.py index c134cda90e2ee..4715936a6e51c 100644 --- a/llvm/utils/lit/lit/llvm/config.py +++ b/llvm/utils/lit/lit/llvm/config.py @@ -674,7 +674,11 @@ def use_clang( ( "%itanium_abi_triple", self.normalize_triple( - self.make_itanium_abi_triple(self.config.target_triple) + self.make_itanium_abi_triple( + self.get_process_output( + [self.config.clang, "--print-target-triple"] + )[0].split("\n")[0] + ) ), ) )