mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SwiftCompilerSources] Make Package.swift static
`Package.swift` in the build directory and symlinking Sources directory wasn't great for source control and break points. Since C modules doesn't need the generated headers at this point, make `Package.swift` static again with a symlink to the string processing source directory.
This commit is contained in:
1
SwiftCompilerSources/.gitignore
vendored
Normal file
1
SwiftCompilerSources/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.swiftpm
|
||||||
@@ -267,25 +267,3 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Configure 'SwiftCompilerModules' SwiftPM package. The 'Package.swift' will
|
|
||||||
# be created at '${build_dir}/SwiftCompilerModulesPackage/Package.swift' and can
|
|
||||||
# be built with 'swift-build'.
|
|
||||||
# Note that this SwiftPM package itself is just for development purposes, and
|
|
||||||
# is not actually used for the compiler building.
|
|
||||||
set(swiftcompiler_modules_package_directory
|
|
||||||
"${SWIFT_BINARY_DIR}/SwiftCompilerModulesPackage")
|
|
||||||
configure_file(Package.swift.in
|
|
||||||
"${swiftcompiler_modules_package_directory}/Package.swift" @ONLY)
|
|
||||||
# SwiftPM requires all sources are inside the directory of 'Package.swift'.
|
|
||||||
# Create symlinks to the actual source directories.
|
|
||||||
execute_process(COMMAND
|
|
||||||
"${CMAKE_COMMAND}" -E create_symlink
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Sources"
|
|
||||||
"${swiftcompiler_modules_package_directory}/Sources")
|
|
||||||
if(SWIFT_BUILD_REGEX_PARSER_IN_COMPILER)
|
|
||||||
execute_process(COMMAND
|
|
||||||
"${CMAKE_COMMAND}" -E create_symlink
|
|
||||||
"${EXPERIMENTAL_STRING_PROCESSING_SOURCE_DIR}/Sources/_RegexParser"
|
|
||||||
"${swiftcompiler_modules_package_directory}/_RegexParser_Sources")
|
|
||||||
endif()
|
|
||||||
|
|||||||
@@ -11,10 +11,6 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// NOTE: This 'Package.swift.in' file is for CMake configure_file().
|
|
||||||
// Generated 'Package.swift' can be found in
|
|
||||||
// '${swift_build_dir}/SwiftCompilerSources/Package.swift'.
|
|
||||||
|
|
||||||
import PackageDescription
|
import PackageDescription
|
||||||
|
|
||||||
private extension Target {
|
private extension Target {
|
||||||
@@ -23,9 +19,7 @@ private extension Target {
|
|||||||
"-Xfrontend", "-validate-tbd-against-ir=none",
|
"-Xfrontend", "-validate-tbd-against-ir=none",
|
||||||
"-Xfrontend", "-enable-cxx-interop",
|
"-Xfrontend", "-enable-cxx-interop",
|
||||||
// Bridging modules and headers
|
// Bridging modules and headers
|
||||||
"-Xcc", "-I", "-Xcc", "@SWIFT_SOURCE_DIR@/include",
|
"-Xcc", "-I", "-Xcc", "../include",
|
||||||
// Generated C headers
|
|
||||||
"-Xcc", "-I", "-Xcc", "@CMAKE_BINARY_DIR@/include",
|
|
||||||
"-cross-module-optimization"
|
"-cross-module-optimization"
|
||||||
]),
|
]),
|
||||||
]
|
]
|
||||||
1
SwiftCompilerSources/_RegexParser_Sources
Symbolic link
1
SwiftCompilerSources/_RegexParser_Sources
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../swift-experimental-string-processing/Sources/_RegexParser
|
||||||
Reference in New Issue
Block a user