From 0ba6a543ddc0d494c891850cbc4a85c7f5b55060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20P=C3=B6chtrager?= Date: Wed, 28 Oct 2015 21:15:54 +0100 Subject: [PATCH] Misc wrapper changes: * Cleanup * xcrun: Add bitcode_strip to known Xcode tools --- wrapper/programs/xcrun.cpp | 2 +- wrapper/target.cpp | 10 ++-------- wrapper/target.h | 2 -- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/wrapper/programs/xcrun.cpp b/wrapper/programs/xcrun.cpp index 29ddd94..c0770f9 100644 --- a/wrapper/programs/xcrun.cpp +++ b/wrapper/programs/xcrun.cpp @@ -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) diff --git a/wrapper/target.cpp b/wrapper/target.cpp index 158ca95..ec4c5f8 100644 --- a/wrapper/target.cpp +++ b/wrapper/target.cpp @@ -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++"); diff --git a/wrapper/target.h b/wrapper/target.h index 9415f3a..cbe799e 100644 --- a/wrapper/target.h +++ b/wrapper/target.h @@ -110,8 +110,6 @@ struct Target { bool hasLibCXX() const; bool libCXXIsDefaultCXXLib() const; - bool isLibCXX() const; - bool isLibSTDCXX() const; bool isCXX(); bool isGCH();