* handle '-sdk' / 'SDKROOT' (env.) properly.
  e.g. 'xcrun -sdk /[...]/MacOSX10.6.sdk clang' will use
  the specified 10.6 SDK.

* never execute xcode tools outside target/bin even when
  a full path is specified.
  e.g. 'xcrun /usr/bin/gcc' will execute target/bin/<triple>-gcc.

other wrapper changes:

* implement 'OSXCROSS_SDKROOT' env. variable for 'xcrun -sdk'.

* error on '-arch x86_64h' + clang <= 3.4.
  clang <= 3.4 misinterprets x86_64h as x86_64.

* only create x86_64h symlinks when the 10.8 (or later) SDK
  is used.

other changes:

* misc fixes and cleanup
This commit is contained in:
Thomas Pöchtrager 2015-06-27 19:01:56 +02:00
parent f5bec454d3
commit da2b8f25f5
15 changed files with 223 additions and 134 deletions

View File

View File

@ -71,6 +71,9 @@ You can turn this behavior off with `OSXCROSS_GCC_NO_STATIC_RUNTIME=1` (env).
### PACKAGING THE SDK: ### ### PACKAGING THE SDK: ###
** [Please ensure you have read and understood the Xcode license
terms before continuing.](https://www.apple.com/legal/sla/docs/xcode.pdf) **
##### Packaging the SDK on Mac OS X: ##### ##### Packaging the SDK on Mac OS X: #####
1. [Download [Xcode](https://developer.apple.com/downloads/index.action?name=Xcode%205.1.1) \*\*] 1. [Download [Xcode](https://developer.apple.com/downloads/index.action?name=Xcode%205.1.1) \*\*]
@ -84,18 +87,12 @@ You can turn this behavior off with `OSXCROSS_GCC_NO_STATIC_RUNTIME=1` (env).
Step 1. and 2. can be skipped if you have Xcode installed. Step 1. and 2. can be skipped if you have Xcode installed.
##### Packing the SDK on Linux, Method 1 (does *NOT* work with Xcode 4.3 or later!): ##### ##### Packing the SDK on Linux (and others), Method 1 (works with Xcode >= 4.3): #####
1. Download 1. Download Xcode like described in 'Packaging the SDK on Mac OS X'
[Xcode 4.2](https://startpage.com/do/search?q=stackoverflow+xcode+4.2+download+snow+leopard) 2. Ensure you have `clang` and `make` installed
for Snow Leopard \*\* 3. Run `./gen_sdk_package_p7zip.sh <xcode>.dmg`
2. Ensure you are downloading the "Snow Leopard" version 4. Copy or move the SDK into the tarballs/ directory
3. Install `dmg2img`
4. Run (as root): `./tools/mount_xcode_image.sh /path/to/xcode.dmg`
5. Follow the instructions printed by `./tools/mount_xcode_image.sh`
6. Copy or move the SDK into the tarballs/ directory
\*\* SHA1 Sum: 1a06882638996dfbff65ea6b4c6625842903ead3.
##### Packing the SDK on Linux, Method 2 (works with Xcode >= 4.3): ##### ##### Packing the SDK on Linux, Method 2 (works with Xcode >= 4.3): #####
@ -104,12 +101,15 @@ Step 1. and 2. can be skipped if you have Xcode installed.
3. Run `./gen_sdk_package_darling_dmg.sh <xcode>.dmg` 3. Run `./gen_sdk_package_darling_dmg.sh <xcode>.dmg`
4. Copy or move the SDK into the tarballs/ directory 4. Copy or move the SDK into the tarballs/ directory
##### Packing the SDK on Linux (and others), Method 3 (works with Xcode >= 4.3): ##### ##### Packing the SDK on Linux, Method 3 (does *NOT* work with Xcode 4.3 or later!): #####
1. Download Xcode 4.2 for Snow Leopard
2. Ensure you are downloading the "Snow Leopard" version
3. Install `dmg2img`
4. Run (as root): `./tools/mount_xcode_image.sh /path/to/xcode.dmg`
5. Follow the instructions printed by `./tools/mount_xcode_image.sh`
6. Copy or move the SDK into the tarballs/ directory
1. Download Xcode like described in 'Packaging the SDK on Mac OS X'
2. Ensure you have `clang` and `make` installed
3. Run `./gen_sdk_package_darling_p7zip.sh <xcode>.dmg`
4. Copy or move the SDK into the tarballs/ directory
### USAGE EXAMPLES: ### ### USAGE EXAMPLES: ###

1
TODO
View File

@ -1 +0,0 @@
report the __block issue in unistd.h to the maintainers

View File

@ -66,8 +66,6 @@ verify_sdk_version $SDK_VERSION
# Minimum targeted OS X version # Minimum targeted OS X version
# Must be <= SDK_VERSION # Must be <= SDK_VERSION
# You can comment this variable out,
# if you want to use the compiler's default value
if [ -z "$OSX_VERSION_MIN" ]; then if [ -z "$OSX_VERSION_MIN" ]; then
if [ $SDK_VERSION = 10.4u ]; then if [ $SDK_VERSION = 10.4u ]; then
OSX_VERSION_MIN=10.4 OSX_VERSION_MIN=10.4
@ -78,10 +76,6 @@ fi
OSXCROSS_VERSION=0.10 OSXCROSS_VERSION=0.10
if [ -z "$OSX_VERSION_MIN" ]; then
OSX_VERSION_MIN="default"
fi
case $SDK_VERSION in case $SDK_VERSION in
10.4*) TARGET=darwin8 ;; 10.4*) TARGET=darwin8 ;;
10.5*) TARGET=darwin9 ;; 10.5*) TARGET=darwin9 ;;
@ -324,18 +318,18 @@ $BASE_DIR/wrapper/build.sh 1>/dev/null
echo "" echo ""
if [ "$OSX_VERSION_MIN" != "default" ]; then if [ `osxcross-cmp ${SDK_VERSION/u/} "<" $OSX_VERSION_MIN` -eq 1 ]; then
if [ `osxcross-cmp ${SDK_VERSION/u/} "<" $OSX_VERSION_MIN` -eq 1 ]; then echo "OSX_VERSION_MIN must be <= SDK_VERSION"
echo "OSX_VERSION_MIN must be <= SDK_VERSION" trap "" EXIT
trap "" EXIT exit 1
exit 1 elif [ `osxcross-cmp $OSX_VERSION_MIN "<" 10.4` -eq 1 ]; then
elif [ `osxcross-cmp $OSX_VERSION_MIN "<" 10.4` -eq 1 ]; then echo "OSX_VERSION_MIN must be >= 10.4"
echo "OSX_VERSION_MIN must be >= 10.4" trap "" EXIT
trap "" EXIT exit 1
exit 1
fi
fi fi
unset MACOSX_DEPLOYMENT_TARGET
test_compiler o32-clang $BASE_DIR/oclang/test.c test_compiler o32-clang $BASE_DIR/oclang/test.c
test_compiler o64-clang $BASE_DIR/oclang/test.c test_compiler o64-clang $BASE_DIR/oclang/test.c

View File

@ -85,8 +85,11 @@ fi
echo "Building Clang/LLVM $CLANG_VERSION may take a long time." echo "Building Clang/LLVM $CLANG_VERSION may take a long time."
echo "Installation Prefix: $INSTALLPREFIX" echo "Installation Prefix: $INSTALLPREFIX"
read -p "Press enter to start building."
echo "" if [ -z "$UNATTENDED" ]; then
read -p "Press enter to start building."
echo ""
fi
pushd $TARBALL_DIR &>/dev/null pushd $TARBALL_DIR &>/dev/null

View File

@ -1,5 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
rm -f *~
rm -rf build git clean -fdx || rm -rf *~ build target *.tar.xz
rm -rf target
rm -f *.tar.xz

View File

@ -66,6 +66,13 @@ else
MAKE=make MAKE=make
fi fi
if [[ $PLATFORM == *BSD ]] || [ $PLATFORM == "Darwin" ]; then
READLINK=greadlink
else
READLINK=readlink
fi
require $MAKE require $MAKE
function extract() function extract()

View File

@ -8,6 +8,11 @@ popd &>/dev/null
set +e set +e
if [ -z "$OSXCROSS_VERSION" ]; then if [ -z "$OSXCROSS_VERSION" ]; then
`../target/bin/osxcross-conf 2>/dev/null` `../target/bin/osxcross-conf 2>/dev/null`
if [ -n "$OSXCROSS_SDK_VERSION" ] ||
[ `osxcross-cmp $OSXCROSS_SDK_VERSION ">=" 10.8` -eq 1 ]; then
X86_64H_SUPPORTED=1
fi
fi fi
set -e set -e
@ -41,8 +46,8 @@ function create_wrapper_link
verbose_cmd ln -sf "${TARGETTRIPLE}-wrapper${EXESUFFIX}" \ verbose_cmd ln -sf "${TARGETTRIPLE}-wrapper${EXESUFFIX}" \
"x86_64-apple-${OSXCROSS_TARGET}-${1}${EXESUFFIX}" "x86_64-apple-${OSXCROSS_TARGET}-${1}${EXESUFFIX}"
if [[ $1 != gcc* ]] && [[ $1 != g++* ]]; then if [ -n "$X86_64H_SUPPORTED" ] &&
# do not create Haswell links for gcc ([[ $1 != gcc* ]] && [[ $1 != g++* ]]); then
verbose_cmd ln -sf "${TARGETTRIPLE}-wrapper${EXESUFFIX}" \ verbose_cmd ln -sf "${TARGETTRIPLE}-wrapper${EXESUFFIX}" \
"x86_64h-apple-${OSXCROSS_TARGET}-${1}${EXESUFFIX}" "x86_64h-apple-${OSXCROSS_TARGET}-${1}${EXESUFFIX}"
fi fi
@ -53,8 +58,8 @@ function create_wrapper_link
verbose_cmd ln -sf "${TARGETTRIPLE}-wrapper${EXESUFFIX}" \ verbose_cmd ln -sf "${TARGETTRIPLE}-wrapper${EXESUFFIX}" \
"o64-${1}${EXESUFFIX}" "o64-${1}${EXESUFFIX}"
if [[ $1 != gcc* ]] && [[ $1 != g++* ]]; then if [ -n "$X86_64H_SUPPORTED" ] &&
# do not create Haswell links for gcc ([[ $1 != gcc* ]] && [[ $1 != g++* ]]); then
verbose_cmd ln -sf "${TARGETTRIPLE}-wrapper${EXESUFFIX}" \ verbose_cmd ln -sf "${TARGETTRIPLE}-wrapper${EXESUFFIX}" \
"o64h-${1}${EXESUFFIX}" "o64h-${1}${EXESUFFIX}"
fi fi
@ -93,7 +98,7 @@ if [ -n "$BWPLATFORM" ]; then
[ -z "$BWCOMPILEONLY" ] && BWCOMPILEONLY=1 [ -z "$BWCOMPILEONLY" ] && BWCOMPILEONLY=1
else else
PLATFORM=$(uname -s) PLATFORM=$(uname -s)
FLAGS="-march=native $CXXFLAGS " [ -z "$PORTABLE"] && FLAGS="-march=native $CXXFLAGS "
fi fi
if [ -n "$BWCXX" ]; then if [ -n "$BWCXX" ]; then

View File

@ -464,8 +464,8 @@ bool detectTarget(int argc, char **argv, Target &target) {
(*prog)(argc, argv, target); (*prog)(argc, argv, target);
if (target.target != getDefaultTarget()) { if (target.target != getDefaultTarget()) {
warn << "target mismatch (" << target.target warn << "this wrapper was built for target "
<< " != " << getDefaultTarget() << ")" << warn.endl(); << "'" << getDefaultTarget() << "'" << warn.endl();
} }
if (!parseArgs()) if (!parseArgs())

View File

@ -33,22 +33,52 @@ namespace {
bool showCommand = false; bool showCommand = false;
bool isXcodeTool(const char *tool) {
constexpr const char *XcodeTools[] = {
"ar", "as", "c89", "c99", "c11", "c++", "cc", "checksyms", "clang",
"dsymutil", "codesign_allocate", "dyldinfo", "gcc", "g++", "gcov",
"gprof", "indr", "install_name_tool", "ld", "libtool", "lipo",
"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"
};
for (const char *xctool : XcodeTools)
if (!strncmp(tool, xctool, strlen(xctool)))
return true;
return false;
}
bool getToolPath(Target &target, std::string &toolpath, const char *tool) { bool getToolPath(Target &target, std::string &toolpath, const char *tool) {
toolpath = target.execpath; const char *filename = getFileName(tool);
toolpath += "/"; bool isxcodetool = isXcodeTool(filename);
toolpath += getArchName(target.arch);
toolpath += "-"; toolpath.clear();
toolpath += getDefaultVendor();
toolpath += "-"; if (tool[0] == PATHDIV) {
toolpath += getDefaultTarget(); if (isxcodetool)
toolpath += "-"; tool = filename; // map /usr/bin/clang (etc.) to <triple>-clang
toolpath += tool; else
toolpath = tool;
}
if (toolpath.empty()) {
toolpath = target.execpath;
toolpath += PATHDIV;
toolpath += getArchName(target.arch);
toolpath += "-";
toolpath += getDefaultVendor();
toolpath += "-";
toolpath += getDefaultTarget();
toolpath += "-";
toolpath += tool;
}
if (!fileExists(toolpath.c_str())) { if (!fileExists(toolpath.c_str())) {
// Fall back to system executables so 'xcrun git status' etc. works. // Fall back to system executables so 'xcrun git status' etc. works.
toolpath.clear(); if (!isxcodetool && realPath(tool, toolpath))
if (realPath(tool, toolpath))
return true; return true;
err << "xcrun: cannot find '" << tool << "' executable" << err.endl(); err << "xcrun: cannot find '" << tool << "' executable" << err.endl();
@ -58,22 +88,52 @@ bool getToolPath(Target &target, std::string &toolpath, const char *tool) {
return true; return true;
} }
int help(Target&, char **) { int help(Target&, char**) {
std::cerr << "https://developer.apple.com/library/mac/documentation/Darwin/" std::cerr << "https://developer.apple.com/library/mac/documentation/Darwin/"
"Reference/ManPages/man1/xcrun.1.html" << std::endl; "Reference/ManPages/man1/xcrun.1.html" << std::endl;
return 0; return 0;
} }
int version(Target&, char **) { int version(Target&, char**) {
std::cout << "xcrun version: 0." << std::endl; std::cout << "xcrun version: 0." << std::endl;
return 0; return 0;
} }
int sdk(Target&, char **argv) { int sdk(Target&, char **argv) {
if (strcmp(argv[0], "macosx")) { const char *SDK = argv[0];
err << "xcrun: expected 'macosx' for '-sdk'" << err.endl();
if (!strcmp(SDK, "macosx") || !strcmp(SDK, "macosx.internal"))
return 0;
// Ignore '/'.
if (SDK[0] == PATHDIV && !SDK[1])
return 0;
std::string SDKPath = SDK;
while (SDKPath.size() && SDKPath[SDKPath.size() - 1] == PATHDIV)
SDKPath.erase(SDKPath.size() - 1, 1);
const char *SDKName = getFileName(SDKPath);
if (!strncasecmp(SDKName, "MacOSX", 6)) {
if (!dirExists(SDK)) {
err << "xcrun: '-sdk': directory '" << SDK << "' does not exist"
<< err.endl();
return 1;
}
setenv("OSXCROSS_SDKROOT", SDK, 1);
return 0;
}
// Ignore empty argument.
if (SDK[0]) {
err << "xcrun: '-sdk': expected Mac OS X SDK" << err.endl();
return 1; return 1;
} }
return 0; return 0;
} }
@ -95,13 +155,18 @@ int find(Target &target, char **argv) {
int run(Target &target, char **argv) { int run(Target &target, char **argv) {
std::string toolpath; std::string toolpath;
std::string command; std::string command;
if (!getToolPath(target, toolpath, argv[0])) if (!getToolPath(target, toolpath, argv[0]))
exit(1); // Should never return. exit(1);
std::vector<char *> args; std::vector<char *> args;
args.push_back(const_cast<char *>(toolpath.c_str())); args.push_back(const_cast<char *>(toolpath.c_str()));
for (char **arg = &argv[1]; *arg; ++arg) for (char **arg = &argv[1]; *arg; ++arg)
args.push_back(*arg); args.push_back(*arg);
args.push_back(nullptr); args.push_back(nullptr);
if (showCommand) { if (showCommand) {
for (size_t i = 0; i < args.size() - 1; ++i) { for (size_t i = 0; i < args.size() - 1; ++i) {
std::cout << args[i]; std::cout << args[i];
@ -110,15 +175,17 @@ int run(Target &target, char **argv) {
} }
std::cout << std::endl; std::cout << std::endl;
} }
execvp(args[0], args.data()); execvp(args[0], args.data());
err << "xcrun: cannot execute '" << args[0] << "'" << err.endl(); err << "xcrun: cannot execute '" << args[0] << "'" << err.endl();
exit(1); exit(1);
// Silence -Wreturn-type warnings in case exit() is not marked as // Silence -Wreturn-type warnings in case exit() is not marked as
// "no-return" for whatever reason. // "no-return" for whatever reason.
__builtin_unreachable(); __builtin_unreachable();
} }
int showSDKPath(Target &target, char **) { int showSDKPath(Target &target, char**) {
std::string SDKPath; std::string SDKPath;
if (!target.getSDKPath(SDKPath)) if (!target.getSDKPath(SDKPath))
return 1; return 1;
@ -126,7 +193,7 @@ int showSDKPath(Target &target, char **) {
return 0; return 0;
} }
int showSDKVersion(Target &target, char **) { int showSDKVersion(Target &target, char**) {
std::cout << target.getSDKOSNum().shortStr() << std::endl; std::cout << target.getSDKOSNum().shortStr() << std::endl;
return 0; return 0;
} }
@ -138,17 +205,22 @@ int xcrun(int argc, char **argv, Target &target) {
showCommand = true; showCommand = true;
constexpr const char *ENVVARS[] = { constexpr const char *ENVVARS[] = {
"DEVELOPER_DIR", "SDKROOT", "TOOLCHAINS", "DEVELOPER_DIR", "TOOLCHAINS", "xcrun_verbose"
"xcrun_verbose"
}; };
for (const char *evar : ENVVARS) { for (const char *evar : ENVVARS) {
if (getenv(evar)) { if (getenv(evar)) {
warn << "xcrun: ignoring environment variable '" << evar << "'" warn << "xcrun: ignoring environment variable "
<< warn.endl(); << "'" << evar << "'" << warn.endl();
} }
} }
if (char *SDK = getenv("SDKROOT")) {
unsetenv("OSXCROSS_SDKROOT");
char *argv[1] = { SDK };
sdk(target, argv);
}
auto dummy = [](Target&, char**) { return 0; }; auto dummy = [](Target&, char**) { return 0; };
ArgParser<int (*)(Target&, char**), 19> argParser = {{ ArgParser<int (*)(Target&, char**), 19> argParser = {{

View File

@ -28,6 +28,7 @@
#include <map> #include <map>
#include <algorithm> #include <algorithm>
#include <cstring> #include <cstring>
#include <strings.h>
#include <cstdlib> #include <cstdlib>
#include <climits> #include <climits>
#include <cassert> #include <cassert>
@ -38,24 +39,42 @@
namespace target { namespace target {
OSVersion Target::getSDKOSNum() const { OSVersion Target::getSDKOSNum() const {
if (target.size() < 7) if (SDK) {
return OSVersion(); std::string SDKPath = SDK;
int n = atoi(target.c_str() + 6); while (SDKPath.size() && SDKPath[SDKPath.size() - 1] == PATHDIV)
return OSVersion(10, 4 + (n - 8)); SDKPath.erase(SDKPath.size() - 1, 1);
const char *SDKName = getFileName(SDKPath);
if (strncasecmp(SDKName, "MacOSX", 6))
return OSVersion();
return parseOSVersion(SDKName + 6);
} else {
if (target.size() < 7)
return OSVersion();
int n = atoi(target.c_str() + 6);
return OSVersion(10, 4 + (n - 8));
}
} }
bool Target::getSDKPath(std::string &path) const { bool Target::getSDKPath(std::string &path) const {
OSVersion SDKVer = getSDKOSNum(); if (SDK) {
path = SDK;
} else {
OSVersion SDKVer = getSDKOSNum();
path = execpath; path = execpath;
path += "/../SDK/MacOSX"; path += "/../SDK/MacOSX";
path += SDKVer.shortStr(); path += SDKVer.shortStr();
if (SDKVer <= OSVersion(10, 4)) if (SDKVer <= OSVersion(10, 4))
path += "u"; path += "u";
path += ".sdk"; path += ".sdk";
}
if (!dirExists(path)) { if (!dirExists(path)) {
err << "cannot find Mac OS X SDK (expected in: " << path << ")" err << "cannot find Mac OS X SDK (expected in: " << path << ")"
@ -467,8 +486,8 @@ bool Target::setup() {
if (haveArch(Arch::x86_64h)) { if (haveArch(Arch::x86_64h)) {
OSNum = OSVersion(10, 8); // Default to 10.8 for x86_64h OSNum = OSVersion(10, 8); // Default to 10.8 for x86_64h
if (SDKOSNum < OSNum) { if (SDKOSNum < OSNum) {
err << "'" << getArchName(arch) << "' requires the SDK from " err << "'" << getArchName(arch) << "' requires Mac OS X SDK "
<< OSNum.Str() << " (or later)" << err.endl(); << OSNum.shortStr() << " (or later)" << err.endl();
return false; return false;
} }
} else if (stdlib == StdLib::libcxx) { } else if (stdlib == StdLib::libcxx) {
@ -488,9 +507,15 @@ bool Target::setup() {
} }
if (haveArch(Arch::x86_64h) && OSNum < OSVersion(10, 8)) { if (haveArch(Arch::x86_64h) && OSNum < OSVersion(10, 8)) {
err << "'" << getArchName(Arch::x86_64h) << "' requires " // -mmacosx-version-min= < 10.8 in combination with '-arch x86_64h'
<< "'-mmacosx-version-min=10.8' (or later)" << err.endl(); // may cause linker errors.
return false;
// Erroring here is really annoying, better risk linking errors instead
// of enforcing '-mmacosx-version-min= >= 10.8'.
if (!getenv("OSXCROSS_NO_X86_64H_DEPLOYMENT_TARGET_WARNING"))
warn << "'-mmacosx-version-min=' should be '>= 10.8' for architecture "
<< "'" << getArchName(Arch::x86_64h) << "'" << warn.endl();
} }
if (stdlib == StdLib::unset) { if (stdlib == StdLib::unset) {
@ -501,7 +526,7 @@ bool Target::setup() {
} }
} else if (stdlib == StdLib::libcxx) { } else if (stdlib == StdLib::libcxx) {
if (!hasLibCXX()) { if (!hasLibCXX()) {
err << "libc++ requires the SDK from 10.7 (or later)" << err.endl(); err << "libc++ requires Mac OS X SDK 10.7 (or later)" << err.endl();
return false; return false;
} }
@ -612,6 +637,12 @@ bool Target::setup() {
warn << "cannot find clang intrinsic headers; please report this " warn << "cannot find clang intrinsic headers; please report this "
"issue to the OSXCross project" << warn.endl(); "issue to the OSXCross project" << warn.endl();
} else { } else {
if (haveArch(Arch::x86_64h) && clangversion < ClangVersion(3, 5)) {
err << "'" << getArchName(Arch::x86_64h) << "' requires clang 3.5 "
<< "(or later)" << err.endl();
return false;
}
fargs.push_back("-isystem"); fargs.push_back("-isystem");
fargs.push_back(tmp); fargs.push_back(tmp);
} }

View File

@ -73,11 +73,10 @@ constexpr OSVersion getDefaultMinTarget() { return OSVersion(); }
struct Target { struct Target {
Target() Target()
: vendor(getDefaultVendor()), arch(Arch::x86_64), : vendor(getDefaultVendor()), SDK(getenv("OSXCROSS_SDKROOT")),
target(getDefaultTarget()), stdlib(StdLib::unset), usegcclibs(), arch(Arch::x86_64), target(getDefaultTarget()), stdlib(StdLib::unset),
nocodegen(), compilername(getDefaultCompiler()), lang(), langstd(), usegcclibs(), nocodegen(), compilername(getDefaultCompiler()), lang(),
sourcefile(), langstd(), sourcefile(), outputname() {
outputname() {
if (!getExecutablePath(execpath, sizeof(execpath))) if (!getExecutablePath(execpath, sizeof(execpath)))
abort(); abort();
} }
@ -142,6 +141,7 @@ struct Target {
bool setup(); bool setup();
const char *vendor; const char *vendor;
const char *SDK;
Arch arch; Arch arch;
std::vector<Arch> targetarch; std::vector<Arch> targetarch;
std::string target; std::string target;

View File

@ -112,7 +112,7 @@ public:
Message(const char *msg, Color color = FG_RED, std::ostream &os = std::cerr) Message(const char *msg, Color color = FG_RED, std::ostream &os = std::cerr)
: msg(msg), color(color), os(os), printprefix(true) {} : msg(msg), color(color), os(os), printprefix(true) {}
} warn("warning"), err("error"), dbg("debug", FG_LIGHT_MAGENTA), } warn("warning"), err("error"), dbg("debug", FG_LIGHT_MAGENTA),
info("info", FG_LIGHT_MAGENTA), warninfo(" info", FG_LIGHT_MAGENTA); info("info", FG_LIGHT_MAGENTA), warninfo("info", FG_LIGHT_MAGENTA);
// //
// Executable path // Executable path

View File

@ -1,8 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<CodeLite_Project Name="wrapper" InternalType=""> <CodeLite_Project Name="wrapper" InternalType="">
<Plugins> <Plugins>
<Plugin Name="qmake">
<![CDATA[00020001N0005Debug0000000000000001N0007Release000000000000]]>
</Plugin>
<Plugin Name="CMakePlugin"> <Plugin Name="CMakePlugin">
<![CDATA[[{ <![CDATA[[{
"name": "Debug",
"enabled": false,
"buildDirectory": "build",
"sourceDirectory": "$(ProjectPath)",
"generator": "",
"buildType": "",
"arguments": [],
"parentProject": ""
}, {
"name": "Release", "name": "Release",
"enabled": false, "enabled": false,
"buildDirectory": "build", "buildDirectory": "build",
@ -13,9 +25,6 @@
"parentProject": "" "parentProject": ""
}]]]> }]]]>
</Plugin> </Plugin>
<Plugin Name="qmake">
<![CDATA[00010001N0007Release000000000000]]>
</Plugin>
</Plugins> </Plugins>
<Description/> <Description/>
<Dependencies/> <Dependencies/>
@ -71,7 +80,7 @@
<CustomBuild Enabled="yes"> <CustomBuild Enabled="yes">
<RebuildCommand/> <RebuildCommand/>
<CleanCommand>make clean</CleanCommand> <CleanCommand>make clean</CleanCommand>
<BuildCommand>make</BuildCommand> <BuildCommand>./build.sh</BuildCommand>
<PreprocessFileCommand/> <PreprocessFileCommand/>
<SingleFileCommand/> <SingleFileCommand/>
<MakefileGenerationCommand/> <MakefileGenerationCommand/>
@ -89,43 +98,5 @@
<SearchPaths/> <SearchPaths/>
</Completion> </Completion>
</Configuration> </Configuration>
<Configuration Name="Release" CompilerType="clang++" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="" C_Options="" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<IncludePath Value="."/>
</Compiler>
<Linker Options="-O2" Required="yes"/>
<ResourceCompiler Options="" Required="no"/>
<General OutputFile="" IntermediateDirectory="./Release" Command="" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
<![CDATA[]]>
</Environment>
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="" IsExtended="no">
<DebuggerSearchPaths/>
<PostConnectCommands/>
<StartupCommands/>
</Debugger>
<PreBuild/>
<PostBuild/>
<CustomBuild Enabled="yes">
<RebuildCommand/>
<CleanCommand>make clean</CleanCommand>
<BuildCommand>make</BuildCommand>
<PreprocessFileCommand/>
<SingleFileCommand/>
<MakefileGenerationCommand/>
<ThirdPartyToolName>None</ThirdPartyToolName>
<WorkingDirectory>$(WorkspacePath)</WorkingDirectory>
</CustomBuild>
<AdditionalRules>
<CustomPostBuild/>
<CustomPreBuild/>
</AdditionalRules>
<Completion EnableCpp11="yes" EnableCpp14="no">
<ClangCmpFlagsC/>
<ClangCmpFlags/>
<ClangPP/>
<SearchPaths/>
</Completion>
</Configuration>
</Settings> </Settings>
</CodeLite_Project> </CodeLite_Project>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<CodeLite_Workspace Name="wrapper" Database="wrapper.tags">
<Project Name="wrapper" Path="./wrapper.project" Active="Yes"/>
<BuildMatrix>
<WorkspaceConfiguration Name="Debug" Selected="yes">
<Project Name="wrapper" ConfigName="Debug"/>
</WorkspaceConfiguration>
</BuildMatrix>
</CodeLite_Workspace>