https://github.com/jakeegan created 
https://github.com/llvm/llvm-project/pull/104806

Currently the option prints a path to a nonexistent directory with the full 
triple, `lib/powerpc64-ibm-aix7.2.0.0`. It should only be `lib/aix`. 

>From 11f5d09315140772877bd460e72a3ddeeceb5641 Mon Sep 17 00:00:00 2001
From: Jake Egan <jake.e...@ibm.com>
Date: Mon, 19 Aug 2024 11:08:24 -0400
Subject: [PATCH] [clang][AIX] Fix -print-runtime-dir on AIX

---
 clang/lib/Driver/ToolChain.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
index 0e8577b1115e38..4059730fa36654 100644
--- a/clang/lib/Driver/ToolChain.cpp
+++ b/clang/lib/Driver/ToolChain.cpp
@@ -831,8 +831,8 @@ std::optional<std::string> ToolChain::getRuntimePath() 
const {
   llvm::sys::path::append(P, "lib");
   if (auto Ret = getTargetSubDirPath(P))
     return Ret;
-  // Darwin does not use per-target runtime directory.
-  if (Triple.isOSDarwin())
+  // Darwin and AIX does not use per-target runtime directory.
+  if (Triple.isOSDarwin() || Triple.isOSAIX())
     return {};
   llvm::sys::path::append(P, Triple.str());
   return std::string(P);

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to