[Driver][Frontend] Add a -nostdlibimport argument

Add a -nostdlibimport (analagous to clang's -nostdlibinc) to remove the SDK paths from the import search paths, but leave the toolchain paths.

rdar://139322299
This commit is contained in:
Ian Anderson
2024-12-28 21:59:29 -05:00
parent 55189bae8e
commit ae753e61a1
4 changed files with 8 additions and 1 deletions

View File

@@ -296,6 +296,7 @@ void ToolChain::addCommonFrontendArgs(const OutputInfo &OI,
inputArgs.AddLastArg(arguments, options::OPT_package_name);
inputArgs.AddLastArg(arguments, options::OPT_export_as);
inputArgs.AddLastArg(arguments, options::OPT_nostdimport);
inputArgs.AddLastArg(arguments, options::OPT_nostdlibimport);
inputArgs.AddLastArg(arguments, options::OPT_parse_stdlib);
inputArgs.AddLastArg(arguments, options::OPT_resource_dir);
inputArgs.AddLastArg(arguments, options::OPT_solver_memory_threshold);