mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SwiftCompiler/Regex] Use bridged DiagnosticEngine for error reporting
This fixes: * An issue where the diagnostic messages were leaked * Diagnose at correct position inside the regex literal To do this: * Introduce 'Parse' SwiftCompiler module that is a bridging layer between '_CompilerRegexParser' and C++ libParse * Move libswiftParseRegexLiteral and libswiftLexRegexLiteral to 'Parse' Also this change makes 'SwiftCompilerSources/Package.swift' be configured by CMake so it can actually be built with 'swift-build'. rdar://92187284
This commit is contained in:
@@ -1,51 +0,0 @@
|
||||
// swift-tools-version:5.3
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "SwiftCompilerSources",
|
||||
platforms: [
|
||||
.macOS("10.9"),
|
||||
],
|
||||
products: [
|
||||
.library(
|
||||
name: "Swift",
|
||||
type: .static,
|
||||
targets: ["SIL", "Optimizer", "_CompilerRegexParser"]),
|
||||
],
|
||||
dependencies: [
|
||||
],
|
||||
// Note that all modules must be added to LIBSWIFT_MODULES in the top-level
|
||||
// CMakeLists.txt file to get debugging working.
|
||||
targets: [
|
||||
.target(
|
||||
name: "SIL",
|
||||
dependencies: [],
|
||||
swiftSettings: [SwiftSetting.unsafeFlags([
|
||||
"-I", "../include/swift",
|
||||
"-cross-module-optimization"
|
||||
])]),
|
||||
.target(
|
||||
name: "_CompilerRegexParser",
|
||||
dependencies: [],
|
||||
path: "_RegexParser",
|
||||
swiftSettings: [
|
||||
.unsafeFlags([
|
||||
"-I", "../include/swift",
|
||||
"-cross-module-optimization",
|
||||
]),
|
||||
// Workaround until `_RegexParser` is imported as implementation-only
|
||||
// by `_StringProcessing`.
|
||||
.unsafeFlags([
|
||||
"-Xfrontend",
|
||||
"-disable-implicit-string-processing-module-import"
|
||||
])]),
|
||||
.target(
|
||||
name: "Optimizer",
|
||||
dependencies: ["SIL", "_CompilerRegexParser"],
|
||||
swiftSettings: [SwiftSetting.unsafeFlags([
|
||||
"-I", "../include/swift",
|
||||
"-cross-module-optimization"
|
||||
])]),
|
||||
]
|
||||
)
|
||||
Reference in New Issue
Block a user