[PATCH] Separate construction of bi-arch path suffix from construction of multi-library path suffix
Rafael Ávila de Espíndola
rafael.espindola at gmail.com
Tue Sep 24 07:08:33 PDT 2013
================
Comment at: lib/Driver/ToolChains.cpp:1309
@@ -1308,24 +1308,3 @@
-static void appendMipsTargetSuffix(std::string &Path,
- llvm::Triple::ArchType TargetArch,
- const ArgList &Args) {
- if (isMips16(Args))
- Path += "/mips16";
- else if (isMicroMips(Args))
- Path += "/micromips";
-
- if (isSoftFloatABI(Args))
- Path += "/soft-float";
-
- if (TargetArch == llvm::Triple::mipsel ||
- TargetArch == llvm::Triple::mips64el)
- Path += "/el";
-}
-
-static StringRef getMipsTargetABISuffix(llvm::Triple::ArchType TargetArch,
- const ArgList &Args) {
- if (TargetArch == llvm::Triple::mips64 ||
- TargetArch == llvm::Triple::mips64el)
- return hasMipsN32ABIArg(Args) ? "/n32" : "/64";
-
- return "/32";
+static bool findCrtBeginObj(Twine Path) {
+ return llvm::sys::fs::exists(Path + "/crtbegin.o");
----------------
hasCrtBeginObj is probably a better name given what this function does.
================
Comment at: lib/Driver/ToolChains.cpp:2285
@@ -2289,5 +2284,3 @@
if (IsAndroid && isMipsR2Arch(Triple.getArch(), Args))
- addPathIfExists(GCCInstallation.getInstallPath() +
- GCCInstallation.getBiarchSuffix() + "/mips-r2",
- Paths);
+ addPathIfExists(GCCInstallation.getInstallPath() + "/mips-r2", Paths);
else
----------------
Not having getBiarchSuffix in here is a functionality change, no? If it is always empty, please assert that.
================
Comment at: test/Driver/linux-ld.c:433
@@ -432,3 +432,2 @@
// CHECK-DEBIAN-MIPS64: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5/64"
-// CHECK-DEBIAN-MIPS64: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5"
// CHECK-DEBIAN-MIPS64: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5/../../.."
----------------
Can you replace it with a CHECK-NOT?
================
Comment at: test/Driver/mips-cs-ld.c:32
@@ -31,3 +31,1 @@
// CHECK-BE-HF-16: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/mips16"
-// CHECK-BE-HF-16: "-L[[TC]]"
-// CHECK-BE-HF-16: "-L[[TC]]/../../../../mips-linux-gnu/libc/mips16/lib"
----------------
Can you replace it with a CHECK-NOT?
http://llvm-reviews.chandlerc.com/D1738
More information about the cfe-commits
mailing list