Skip to content

Commit 12f94dd

Browse files
committed
sil-opt: Add options disable-implicit-swift-modules and explicit-swift-module-map-file
1 parent 62993ff commit 12f94dd

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lib/DriverTool/sil_opt_main.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,15 @@ struct SILOptOptions {
246246
DisableObjCInterop = llvm::cl::opt<bool>("disable-objc-interop",
247247
llvm::cl::desc("Disable Objective-C interoperability."));
248248

249+
llvm::cl::opt<bool>
250+
DisableImplicitModules = llvm::cl::opt<bool>("disable-implicit-swift-modules",
251+
llvm::cl::desc("Disable implicit swift modules."));
252+
253+
llvm::cl::opt<std::string>
254+
ExplicitSwiftModuleMapPath = llvm::cl::opt<std::string>(
255+
"explicit-swift-module-map-file",
256+
llvm::cl::desc("Explict swift module map file path"));
257+
249258
llvm::cl::list<std::string>
250259
ExperimentalFeatures = llvm::cl::list<std::string>("enable-experimental-feature",
251260
llvm::cl::desc("Enable the given experimental feature."));
@@ -679,6 +688,12 @@ int sil_opt_main(ArrayRef<const char *> argv, void *MainAddr) {
679688
= options.EnableLibraryEvolution;
680689
Invocation.getFrontendOptions().StrictImplicitModuleContext
681690
= options.StrictImplicitModuleContext;
691+
692+
Invocation.getFrontendOptions().DisableImplicitModules =
693+
options.DisableImplicitModules;
694+
Invocation.getSearchPathOptions().ExplicitSwiftModuleMapPath =
695+
options.ExplicitSwiftModuleMapPath;
696+
682697
// Set the module cache path. If not passed in we use the default swift module
683698
// cache.
684699
Invocation.getClangImporterOptions().ModuleCachePath = options.ModuleCachePath;

0 commit comments

Comments
 (0)