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

Thomas Preud'homme via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 4 05:50:40 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@"
----------------
RoboTux wrote:

But then why do we need the check since we only use self.config.target_triple below? Why not only check for self.config.target_triple?

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


More information about the llvm-commits mailing list