mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Driver: introduce -sysroot option for non-Darwin targets
This introduces a secondary flag `-sysroot` for the non-Darwin targets, primarily Unicies. The intention here is to support a split `-sdk`, `-sysroot` model where the `-sdk` parameter provides the Swift "SDK" which augments the native platform's C sysroot which is indicated as `-sysroot`. For the case of Android, this would allow us to provide a path to the NDK sysroot and the Swift SDK allowing us to cross-compile Android binaries from Windows.
This commit is contained in:
@@ -2113,6 +2113,9 @@ static bool ParseSearchPathArgs(SearchPathOptions &Opts, ArgList &Args,
|
||||
if (const Arg *A = Args.getLastArg(OPT_visualc_tools_version))
|
||||
Opts.setVCToolsVersion(A->getValue());
|
||||
|
||||
if (const Arg *A = Args.getLastArg(OPT_sysroot))
|
||||
Opts.setSysRoot(A->getValue());
|
||||
|
||||
if (const Arg *A = Args.getLastArg(OPT_resource_dir))
|
||||
Opts.RuntimeResourcePath = A->getValue();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user