-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Always build SwiftDriver and use it as default compiler driver #36377
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
@swift-ci please test |
Build failed |
Build failed |
@nkcsgexi curious what you think of this approach |
5f373f1
to
4513ec2
Compare
This is a great idea to enable compiler engineers to always test swift-driver as they do for the C++ driver. Thanks for working on this! |
7d7f6a0
to
f9935f6
Compare
Together with: swiftlang/swift-driver#537 |
utils/swift_build_support/swift_build_support/products/swiftdriver.py
Outdated
Show resolved
Hide resolved
Together with: swiftlang/swift-driver#537 |
f9935f6
to
6084170
Compare
Together with: swiftlang/swift-driver#537 |
a10b822
to
4277506
Compare
Together with: swiftlang/swift-driver#537 |
4277506
to
68ac381
Compare
Together with: swiftlang/swift-driver#537 |
4 similar comments
Together with: swiftlang/swift-driver#537 |
Together with: swiftlang/swift-driver#537 |
Together with: swiftlang/swift-driver#537 |
Together with: swiftlang/swift-driver#537 |
9beccee
to
98ad24f
Compare
Together with: swiftlang/swift-driver#537 |
98ad24f
to
e94617e
Compare
I'm not sure if my questions even make sense, so you don't need to repeat them verbatim in a doc. I'm confused about the design of the command line interfaces for our driver-like tools and not sure where to look. |
The new swift-driver (Still invoked as
The mechanism by which we are deploying the new driver today is as follows:
AFAIK, there is no difference in doing this with either driver.
@atrick, thank you for these questions, I do think they highlight some pretty obvious gaps in documentation in this transition which must be documented, either in the docs here, or in the swift-driver repo, or both. I like @gottesmm 's idea of having an F.A.Q. in the docs here, with the swift-driver's own documentation (in its corresponding repository) providing more in-depth docs. |
@swift-ci please test |
Build failed |
Build failed |
…iver. This will make sure that compiler developers are using the new driver when they build the compiler locally and use it. - Adds a new build-script product category: before_build_script_impl for products we wish to build before the impl products. - Adds a new EarlySwiftDriver product to that category, which gets built with the host toolchain. - Adds an escape hatch: --skip-early-swift-driver - Adjusts the swift CMake configuration with an additional step: swift_create_early_driver_symlinks which (if one was built) creates symlinks in the swift build bin directory to the EarlySwiftDriver swift-driver and swift-help executables. - Adds a new test subset : only_early_swiftdriver, which will get built into a corresponding CMake test target: check-swift-only_early_swiftdriver-* which runs a small subset of driver-related tests against the Early SwiftDriver. - This subset is run always when the compiler itself is tested (--test is specified) - With an escape disable-switch: --skip-test-early-swift-driver - All tests outside of only_early_swiftdriver are forced to run using the legacy C++ driver (to ensure it gets tested, still). NOTE: SwiftDriver product (no 'Early') is still the main product used to build the driver for toolchain installation into and for executing the product's own tests. This change does not affect that.
750923a
to
60a4af3
Compare
@swift-ci please test |
Thanks Artem! I think you can just cross reference
Also, |
That's a good point, it is redundant, and is just an artifact of the times before
Both are the driver, just two different "modes" of the driver. For |
@swift-ci please test Windows platform |
In the original implementation (swiftlang#36377), using `--infer` accidentally disables the `earlyswiftdriver` product (`before_impl_product_classes` set to always empty). This change fixes that and makes sure early SwiftDriver is always built, regardless of whether or not `--infer` is used. This change also ensures that `install_all` setting triggered by `--infer` does not affect products which specify `is_ignore_install_all_product` to return True. This is useful for products which should not be installed into the toolchain (corresponding build products that use the just-built toolchain are the products that get installed, e.g. `swiftdriver` to `earlyswiftdriver`).
Always build (and use) the new SwiftDriver as the default compiler driver.
This will make sure that compiler developers are using the new driver when they build the compiler locally and use it.
build-script
product category:before_build_script_impl
for products we wish to build before theimpl
products.EarlySwiftDriver
product to that category, which gets built with the host toolchain.--skip-early-swift-driver
swift
CMake configuration with an additional step:swift_create_early_driver_symlinks
which (if one was built) creates symlinks in theswift
buildbin
directory to the EarlySwiftDriverswift-driver
andswift-help
executables.only_early_swiftdriver
, which will get built into a corresponding CMake test target:check-swift-only_early_swiftdriver-*
which runs a small subset of driver-related tests against the Early SwiftDriver.--test
is specified)--skip-test-early-swift-driver
only_early_swiftdriver
are forced to run using the legacy C++ driver (to ensure it gets tested, still).SwiftDriver
product (no 'Early') is still the main product used to build the driver for toolchain installation into and for executing the product's own tests. This change does not affect that.