mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Option] Add compiler option to specify executable plugins
Add a compiler option `-load-plugin-executable <path>#<module names>`. Where '<path>' is a path to a plugin executable, '<module-name>' is a comma-separated module names the plugin provides. Nothing is using it at this point. Actual plugin infratructure are introduced in follow-up commits
This commit is contained in:
@@ -1474,6 +1474,15 @@ static bool ParseSearchPathArgs(SearchPathOptions &Opts,
|
||||
}
|
||||
Opts.setCompilerPluginLibraryPaths(CompilerPluginLibraryPaths);
|
||||
|
||||
std::vector<std::string> CompilerPluginExecutablePaths(
|
||||
Opts.getCompilerPluginExecutablePaths());
|
||||
for (const Arg *A : Args.filtered(OPT_load_plugin_executable)) {
|
||||
// NOTE: The value has '#<module names>' after the path.
|
||||
// But resolveSearchPath() works as long as the value starts with a path.
|
||||
CompilerPluginExecutablePaths.push_back(resolveSearchPath(A->getValue()));
|
||||
}
|
||||
Opts.setCompilerPluginExecutablePaths(CompilerPluginExecutablePaths);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user