diff --git a/SwiftCompilerSources/.gitignore b/SwiftCompilerSources/.gitignore new file mode 100644 index 00000000000..3552f2b4564 --- /dev/null +++ b/SwiftCompilerSources/.gitignore @@ -0,0 +1 @@ +.swiftpm diff --git a/SwiftCompilerSources/CMakeLists.txt b/SwiftCompilerSources/CMakeLists.txt index 6ab0ac16b2e..e9a06874daf 100644 --- a/SwiftCompilerSources/CMakeLists.txt +++ b/SwiftCompilerSources/CMakeLists.txt @@ -267,25 +267,3 @@ else() 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() diff --git a/SwiftCompilerSources/Package.swift.in b/SwiftCompilerSources/Package.swift similarity index 88% rename from SwiftCompilerSources/Package.swift.in rename to SwiftCompilerSources/Package.swift index e4b3b37be69..3c65e816d84 100644 --- a/SwiftCompilerSources/Package.swift.in +++ b/SwiftCompilerSources/Package.swift @@ -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 private extension Target { @@ -23,9 +19,7 @@ private extension Target { "-Xfrontend", "-validate-tbd-against-ir=none", "-Xfrontend", "-enable-cxx-interop", // Bridging modules and headers - "-Xcc", "-I", "-Xcc", "@SWIFT_SOURCE_DIR@/include", - // Generated C headers - "-Xcc", "-I", "-Xcc", "@CMAKE_BINARY_DIR@/include", + "-Xcc", "-I", "-Xcc", "../include", "-cross-module-optimization" ]), ] diff --git a/SwiftCompilerSources/_RegexParser_Sources b/SwiftCompilerSources/_RegexParser_Sources new file mode 120000 index 00000000000..8c4799dab65 --- /dev/null +++ b/SwiftCompilerSources/_RegexParser_Sources @@ -0,0 +1 @@ +../../swift-experimental-string-processing/Sources/_RegexParser \ No newline at end of file