Add -resource-dir option to find lib/swift directory.

This is equivalent to Clang's -fresource-dir; it provides the location of
compiler modules and libraries.

No end-user-visible changes, but the iOS build will no longer have to use
-I to build and test its own standard libraries.

Swift SVN r13888
This commit is contained in:
Jordan Rose
2014-02-14 01:27:15 +00:00
parent 327439f3ab
commit 93b87edcbe
5 changed files with 40 additions and 32 deletions

View File

@@ -550,6 +550,10 @@ static bool ParseSearchPathArgs(SearchPathOptions &Opts, ArgList &Args,
Opts.SDKPath = A->getValue();
}
if (const Arg *A = Args.getLastArg(OPT_resource_dir)) {
Opts.RuntimeResourcePath = A->getValue();
}
// Opts.RuntimeIncludePath is set by calls to
// setRuntimeIncludePath() or setMainExecutablePath().
// Opts.RuntimeImportPath is set by calls to