mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ASTGen] Move regex literal parsing from SwiftCompilerSources to ASTGen
ASTGen always builds with the host Swift compiler, without requiring bootstrapping, and is enabled in more places. Move the regex literal parsing logic there so it is enabled in more host environments, and makes use of CMake's Swift support. Enable all of the regex literal tests when ASTGen is built, to ensure everything is working. Remove the "AST" and "Parse" Swift modules from SwiftCompilerSources, because they are no longer needed.
This commit is contained in:
@@ -67,39 +67,22 @@ let package = Package(
|
||||
.library(
|
||||
name: "swiftCompilerModules",
|
||||
type: .static,
|
||||
targets: ["Basic", "AST", "Parse", "SIL", "Optimizer", "_CompilerRegexParser"]),
|
||||
targets: ["Basic", "SIL", "Optimizer"]),
|
||||
],
|
||||
dependencies: [
|
||||
],
|
||||
// Note that targets and their dependencies must align with
|
||||
// 'SwiftCompilerSources/Sources/CMakeLists.txt'
|
||||
targets: [
|
||||
.compilerModuleTarget(
|
||||
name: "_CompilerRegexParser",
|
||||
dependencies: [],
|
||||
path: "_RegexParser_Sources",
|
||||
swiftSettings: [
|
||||
// Workaround until `_CompilerRegexParser` is imported as implementation-only
|
||||
// by `_StringProcessing`.
|
||||
.unsafeFlags([
|
||||
"-Xfrontend",
|
||||
"-disable-implicit-string-processing-module-import"
|
||||
])]),
|
||||
.compilerModuleTarget(
|
||||
name: "Basic",
|
||||
dependencies: []),
|
||||
.compilerModuleTarget(
|
||||
name: "AST",
|
||||
dependencies: ["Basic"]),
|
||||
.compilerModuleTarget(
|
||||
name: "Parse",
|
||||
dependencies: ["Basic", "AST", "_CompilerRegexParser"]),
|
||||
.compilerModuleTarget(
|
||||
name: "SIL",
|
||||
dependencies: ["Basic"]),
|
||||
.compilerModuleTarget(
|
||||
name: "Optimizer",
|
||||
dependencies: ["Basic", "SIL", "Parse"]),
|
||||
dependencies: ["Basic", "SIL"]),
|
||||
],
|
||||
cxxLanguageStandard: .cxx17
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user