mirror of
https://github.com/Relintai/osxcross.git
synced 2025-02-03 22:45:56 +01:00
Added the command line switch -foc-compiler-path to allow for setting
the compiler's path without having to look at PATH environment variable
This commit is contained in:
parent
474f359d2f
commit
773af0e75c
@ -167,6 +167,11 @@ bool usegcclibstdcxx(Target &target, const char *, const char *, char **) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool compilerpath(Target &target, const char *, const char *path, char **) {
|
||||
target.compilerpath = path;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool runprog(Target &target, const char *, const char *progname, char **cargs) {
|
||||
auto *prog = program::getprog(progname);
|
||||
|
||||
@ -258,6 +263,7 @@ constexpr struct Opt {
|
||||
{"-icxx-isystem", checkincludepath, true, true},
|
||||
{"-cxx-isystem", checkincludepath, true, true},
|
||||
{"-I", checkincludepath, true, true},
|
||||
{"-foc-compiler-path", compilerpath, true, false, "="} // sets a custom path for the compiler
|
||||
};
|
||||
|
||||
bool parse(int argc, char **argv, Target &target) {
|
||||
|
@ -288,6 +288,10 @@ void Target::setCompilerPath() {
|
||||
compilerexecname = getTriple();
|
||||
compilerexecname += "-";
|
||||
compilerexecname += compilername;
|
||||
} else {
|
||||
if (!compilerpath.empty()) {
|
||||
compilerpath += "/";
|
||||
compilerpath += compilername;
|
||||
} else {
|
||||
if (!realPath(compilername.c_str(), compilerpath, ignoreCCACHE))
|
||||
compilerpath = compilername;
|
||||
@ -295,6 +299,7 @@ void Target::setCompilerPath() {
|
||||
compilerexecname += compilername;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool Target::findClangIntrinsicHeaders(std::string &path) {
|
||||
static std::stringstream dir;
|
||||
|
Loading…
Reference in New Issue
Block a user