Driver: introduce additional Windows controls

This adds the following four new options:
  - `-windows-sdk-root`
  - `-windows-sdk-version`
  - `-visualc-tools-root`
  - `-visualc-tools-version`

Together these options make one the master of Windows SDK selection for
the Swift compilation.  This is important as now that the injection is
no longer done by the user, we need to ensure that we have enough
control over the paths so that the synthesized overlay is going to map
the files to the proper location.
This commit is contained in:
Saleem Abdulrasool
2023-03-06 13:29:31 -08:00
parent 342e5f6725
commit 73cafebaf5
6 changed files with 98 additions and 4 deletions

View File

@@ -1461,6 +1461,15 @@ static bool ParseSearchPathArgs(SearchPathOptions &Opts,
if (const Arg *A = Args.getLastArg(OPT_sdk))
Opts.setSDKPath(A->getValue());
if (const Arg *A = Args.getLastArg(OPT_windows_sdk_root))
Opts.setWinSDKRoot(A->getValue());
if (const Arg *A = Args.getLastArg(OPT_windows_sdk_version))
Opts.setWinSDKVersion(A->getValue());
if (const Arg *A = Args.getLastArg(OPT_visualc_tools_root))
Opts.setVCToolsRoot(A->getValue());
if (const Arg *A = Args.getLastArg(OPT_visualc_tools_version))
Opts.setVCToolsVersion(A->getValue());
if (const Arg *A = Args.getLastArg(OPT_resource_dir))
Opts.RuntimeResourcePath = A->getValue();