File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 1515// ===----------------------------------------------------------------------===//
1616
1717#include " swift/Basic/LLVMInitialize.h"
18+ #include " swift/Basic/InitializeSwiftModules.h"
1819#include " swift/DependencyScan/DependencyScanImpl.h"
1920#include " swift/DependencyScan/DependencyScanningTool.h"
2021#include " swift/DependencyScan/StringUtils.h"
2122#include " swift/DriverTool/DriverTool.h"
2223#include " swift/Option/Options.h"
24+ #include " swift/SIL/SILBridging.h"
2325
2426using namespace swift ::dependencies;
2527
@@ -129,7 +131,11 @@ void swiftscan_scanner_cache_reset(swiftscan_scanner_t scanner) {
129131// === Scanner Functions ---------------------------------------------------===//
130132
131133swiftscan_scanner_t swiftscan_scanner_create (void ) {
134+ static std::mutex initializationMutex;
135+ std::lock_guard<std::mutex> lock (initializationMutex);
132136 INITIALIZE_LLVM ();
137+ if (!swiftModulesInitialized ())
138+ initializeSwiftModules ();
133139 return wrap (new DependencyScanningTool ());
134140}
135141
You can’t perform that action at this time.
0 commit comments