File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ set(LLVM_EXPORTED_SYMBOL_FILE
66
77add_swift_host_library(libSwiftScan SHARED
88 libSwiftScan.cpp
9- c-include -check.c)
9+ c-include -check.c
10+ HAS_SWIFT_MODULES)
1011
1112if (${SWIFT_HOST_VARIANT_SDK} IN_LIST SWIFT_DARWIN_PLATFORMS)
1213 # Workaround for a linker crash related to autolinking: rdar://77839981
@@ -23,7 +24,7 @@ target_link_libraries(libSwiftScan PRIVATE
2324 swiftDriverTool
2425 swiftStaticMirror
2526 swiftRemoteInspection
26- swiftCompilerStub )
27+ swiftCompilerModules )
2728
2829set_target_properties (libSwiftScan
2930 PROPERTIES
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/DriverTool/DriverTool.h"
1920#include " swift/DependencyScan/DependencyScanImpl.h"
2021#include " swift/DependencyScan/DependencyScanningTool.h"
@@ -114,6 +115,9 @@ void swiftscan_scanner_cache_reset(swiftscan_scanner_t scanner) {
114115
115116swiftscan_scanner_t swiftscan_scanner_create (void ) {
116117 INITIALIZE_LLVM ();
118+ // We must initialize the swift modules responsible for parsing functionality,
119+ // such as parsing regex.
120+ initializeSwiftParseModules ();
117121 return wrap (new DependencyScanningTool ());
118122}
119123
You can’t perform that action at this time.
0 commit comments