[llvm] [llvm][lit] Handle case when there is no llvm default target triple (PR #76934)

David Spickett via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 4 06:25:18 PST 2024


================
@@ -632,15 +632,28 @@ def use_clang(
             self.add_tool_substitutions(tool_substitutions)
             self.config.substitutions.append(("%resource_dir", builtin_include_dir))
 
-        self.config.substitutions.append(
-            (
-                "%itanium_abi_triple",
-                self.make_itanium_abi_triple(self.config.target_triple),
+        # There will be no default target triple if one was not specifically
+        # set, and the host's architecture is not an enabled target.
+        if (
+            self.config.target_triple
+            and self.config.target_triple != "@LLVM_TARGET_TRIPLE@"
----------------
DavidSpickett wrote:

I'm not sure what you mean, please suggest what you think the code should look like.

https://github.com/llvm/llvm-project/pull/76934


More information about the llvm-commits mailing list