mirror of
https://github.com/Relintai/osxcross.git
synced 2025-02-03 22:45:56 +01:00
Add -foc-intrinsic-path to let the use specify a custom location for
clang's intrinsic headers. This path is relative to clang's binary dir (which can be set with -foc-compiler-path)
This commit is contained in:
parent
773af0e75c
commit
1ef9def644
@ -172,6 +172,11 @@ bool compilerpath(Target &target, const char *, const char *path, char **) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool intrinsicpath(Target &target, const char *, const char *path, char **) {
|
||||||
|
target.intrinsicpath = path;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool runprog(Target &target, const char *, const char *progname, char **cargs) {
|
bool runprog(Target &target, const char *, const char *progname, char **cargs) {
|
||||||
auto *prog = program::getprog(progname);
|
auto *prog = program::getprog(progname);
|
||||||
|
|
||||||
@ -263,7 +268,13 @@ constexpr struct Opt {
|
|||||||
{"-icxx-isystem", checkincludepath, true, true},
|
{"-icxx-isystem", checkincludepath, true, true},
|
||||||
{"-cxx-isystem", checkincludepath, true, true},
|
{"-cxx-isystem", checkincludepath, true, true},
|
||||||
{"-I", checkincludepath, true, true},
|
{"-I", checkincludepath, true, true},
|
||||||
{"-foc-compiler-path", compilerpath, true, false, "="} // sets a custom path for the compiler
|
|
||||||
|
// sets a custom path for the compiler
|
||||||
|
{"-foc-compiler-path", compilerpath, true, false, "="},
|
||||||
|
|
||||||
|
// specifies an additional directory to search when looking for clang's
|
||||||
|
// intrinsic paths
|
||||||
|
{"-foc-intrinsic-path", intrinsicpath, true, false, "="}
|
||||||
};
|
};
|
||||||
|
|
||||||
bool parse(int argc, char **argv, Target &target) {
|
bool parse(int argc, char **argv, Target &target) {
|
||||||
|
@ -409,6 +409,10 @@ do { \
|
|||||||
TRYDIR2("/../include/clang");
|
TRYDIR2("/../include/clang");
|
||||||
TRYDIR2("/usr/include/clang");
|
TRYDIR2("/usr/include/clang");
|
||||||
|
|
||||||
|
if (!intrinsicpath.empty()) {
|
||||||
|
TRYDIR2(intrinsicpath);
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
#undef TRYDIR
|
#undef TRYDIR
|
||||||
#undef TRYDIR2
|
#undef TRYDIR2
|
||||||
|
@ -149,6 +149,7 @@ struct Target {
|
|||||||
string_vector args;
|
string_vector args;
|
||||||
const char *language;
|
const char *language;
|
||||||
char execpath[PATH_MAX + 1];
|
char execpath[PATH_MAX + 1];
|
||||||
|
std::string intrinsicpath;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace target
|
} // namespace target
|
||||||
|
Loading…
Reference in New Issue
Block a user