-
Notifications
You must be signed in to change notification settings - Fork 449
[CMake] Rework build and installation of all swift-syntax modules #1097
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a lot of CMake code repeated across the various libraries. Consolidate that into a new `add_swift_host_library` and use it throughout.
Host content for Swift will go into this directory, to be installed later.
@swift-ci please test |
@swift-ci please test |
1 similar comment
@swift-ci please test |
@swift-ci please test Linux |
@swift-ci please clean test macOS |
…faces." This reverts commit 2f1be83.
@swift-ci please test |
@swift-ci please test |
I'm turning off building with library evolution for the moment, because it's triggering some surprising failures in parsing |
@swift-ci please test |
set(module_dir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) | ||
set(module_base "${module_dir}/${name}.swiftmodule") | ||
set(module_file "${module_base}/${SWIFT_MODULE_TRIPLE}.swiftmodule") | ||
set(module_interface_file "${module_base}/${SWIFT_MODULE_TRIPLE}.swiftinterface") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don’t use module_interface_file
anywhere. Is that intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a vestige of the failed attempt to enable library evolution. There's a potential miscompile in the very old Swift on CI.
@swift-ci please test |
Rework the build and installation of all swift-syntax modules in a few ways:
add_swift_host_library
to eliminate a lot of copy-and-paste.BUILD_SHARED_LIBS
rather than forcing static builds; the compiler will start building these as dynamic libraries.swiftmodule
directorieslib/swift/host
in the toolchain, so other clients can use them