Misc wrapper changes:

* Cleanup
* xcrun: Add bitcode_strip to known Xcode tools
This commit is contained in:
Thomas Pöchtrager 2015-10-28 21:15:54 +01:00
parent 989c7f3b5f
commit 0ba6a543dd
3 changed files with 3 additions and 11 deletions

View File

@ -37,7 +37,7 @@ bool isXcodeTool(const char *tool) {
"machocheck", "nm", "nmedit", "ObjectDump", "objdump", "otool",
"pagestuff", "pkg-config", "ranlib", "redo_prebinding",
"seg_addr_table", "seg_hack", "size", "strings", "strip", "sw_vers",
"unwinddump", "xcodebuild", "xcrun"
"unwinddump", "xcodebuild", "xcrun", "bitcode_strip"
};
for (const char *xctool : XcodeTools)

View File

@ -236,12 +236,6 @@ bool Target::libCXXIsDefaultCXXLib() const {
OSNum >= OSVersion(10, 9);
}
bool Target::isLibCXX() const {
return stdlib == StdLib::libcxx || libCXXIsDefaultCXXLib();
}
bool Target::isLibSTDCXX() const { return stdlib == StdLib::libstdcxx; }
bool Target::isCXX() {
if (isKnownCompiler())
return (compiler == Compiler::CLANGXX || compiler == Compiler::GXX);
@ -692,7 +686,7 @@ bool Target::setup() {
}
}
} else if (isGCC()) {
if (isCXX() && isLibCXX()) {
if (isCXX() && stdlib == StdLib::libcxx) {
fargs.push_back("-nostdinc++");
fargs.push_back("-nodefaultlibs");
@ -701,7 +695,7 @@ bool Target::setup() {
fargs.push_back("-lc++");
fargs.push_back("-lgcc_s.10.5");
}
} else if (!isLibCXX() && !isGCH() &&
} else if (stdlib != StdLib::libcxx && !isGCH() &&
!getenv("OSXCROSS_GCC_NO_STATIC_RUNTIME")) {
fargs.push_back("-static-libgcc");
fargs.push_back("-static-libstdc++");

View File

@ -110,8 +110,6 @@ struct Target {
bool hasLibCXX() const;
bool libCXXIsDefaultCXXLib() const;
bool isLibCXX() const;
bool isLibSTDCXX() const;
bool isCXX();
bool isGCH();