mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ExplicitModuleLoader: take a JSON file that specifies details of explicit Swift modules
Instead of taking paths of Swift module files from front-end command line arguments, we should take a JSON file specifying details of explicit modules. The advantages is (1) .swiftdoc and .swiftsourceinfo can be associated with a .swiftmodule file, and (2) module names are explicitly used as keys in the JSON input so we don't need to eagerly deserialize a .swiftmodule file to collect the module name.
This commit is contained in:
@@ -872,6 +872,8 @@ static bool ParseSearchPathArgs(SearchPathOptions &Opts,
|
||||
for (auto A: Args.filtered(OPT_swift_module_file)) {
|
||||
Opts.ExplicitSwiftModules.push_back(resolveSearchPath(A->getValue()));
|
||||
}
|
||||
if (const Arg *A = Args.getLastArg(OPT_explict_swift_module_map))
|
||||
Opts.ExplicitSwiftModuleMap = A->getValue();
|
||||
// Opts.RuntimeIncludePath is set by calls to
|
||||
// setRuntimeIncludePath() or setMainExecutablePath().
|
||||
// Opts.RuntimeImportPath is set by calls to
|
||||
|
||||
Reference in New Issue
Block a user