[clang] 775a294 - [Driver] Gnu.cpp: remove unneeded -L detection for libc++

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 20 20:12:51 PDT 2021


Author: Fangrui Song
Date: 2021-03-20T18:56:40-07:00
New Revision: 775a294820caefdce4e60603eaac0a071dd72765

URL: https://github.com/llvm/llvm-project/commit/775a294820caefdce4e60603eaac0a071dd72765
DIFF: https://github.com/llvm/llvm-project/commit/775a294820caefdce4e60603eaac0a071dd72765.diff

LOG: [Driver] Gnu.cpp: remove unneeded -L detection for libc++

If clang is installed in the system, the other -L suffice;
otherwise $ccc_install_dir/../lib below suffices.

Added: 
    

Modified: 
    clang/lib/Driver/ToolChains/Linux.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp
index ad98013dd4f0..6599f46d0d52 100644
--- a/clang/lib/Driver/ToolChains/Linux.cpp
+++ b/clang/lib/Driver/ToolChains/Linux.cpp
@@ -307,16 +307,6 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
 
   Generic_GCC::AddMultilibPaths(D, SysRoot, OSLibDir, MultiarchTriple, Paths);
 
-  // Similar to the logic for GCC above, if we currently running Clang inside
-  // of the requested system root, add its parent library paths to
-  // those searched.
-  // FIXME: It's not clear whether we should use the driver's installed
-  // directory ('Dir' below) or the ResourceDir.
-  if (StringRef(D.Dir).startswith(SysRoot)) {
-    addPathIfExists(D, D.Dir + "/../lib/" + MultiarchTriple, Paths);
-    addPathIfExists(D, D.Dir + "/../" + OSLibDir, Paths);
-  }
-
   addPathIfExists(D, SysRoot + "/lib/" + MultiarchTriple, Paths);
   addPathIfExists(D, SysRoot + "/lib/../" + OSLibDir, Paths);
 


        


More information about the cfe-commits mailing list