Skip to content

[build-script] Add support for building, installing, and testing swift-driver #32474

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

Merged
merged 3 commits into from
Jun 20, 2020

Conversation

DougGregor
Copy link
Member

Add build-script command-line options for building, installing, and
testing swift-driver:

  • --swift-driver will build the Swift driver. If testing is enabled,
    it will be tested as well
  • --install-swift-driver will install the swift-driver and
    swift-help executables in the toolchain.
  • --skip-test-swift-driver will disable testing of the Swift driver
    when other tests are being run.

The Swift driver depends on SwiftPM to build; it is recommended that
you use --infer to get the appropriate dependencies built.

Note that this option does not yet replace the existing Swift driver
executables (swiftc, swift) with the new driver, nor does it
install the SwiftDriver library for use elsewhere.

…t-driver

Add build-script command-line options for building, installing, and
testing swift-driver:
* `--swift-driver` will build the Swift driver. If testing is enabled,
  it will be tested as well
* `--install-swift-driver` will install the `swift-driver` and
  `swift-help` executables in the toolchain.
* `--skip-test-swift-driver` will disable testing of the Swift driver
when other tests are being run.

The Swift driver depends on SwiftPM to build; it is recommended that
you use `--infer` to get the appropriate dependencies built.

Note that this option does not yet replace the existing Swift driver
executables (`swiftc`, `swift`) with the new driver, nor does it
install the SwiftDriver library for use elsewhere.
@DougGregor
Copy link
Member Author

@swift-ci please test

def get_dependencies(cls):
return [cmark.CMark,
llvm.LLVM,
libcxx.LibCXX,
Copy link
Member

@compnerd compnerd Jun 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is libc++ a strict dependency? What about non-Darwin targets? Actually, given ICU, I suspect its the superset of dependencies. Might be nice to have a comment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cargo-culted this from SwiftPM's dependencies. @gottesmm do you recall why we have the libc++ dependency here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is b/c I used the most conservative set of dependencies that build-script had. If you don't need it (or these other projects don't) then I would just remove it.

I think of it as a base part of the just built toolchain like clang/compiler-rt. So I imagine it doesn't hurt anything.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IOW, build-script had a linear ordering that never changed. I created the simplest correct dependency chain by (ignoring lldb) making all products depend on all other products before them.

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - bf9f0ec

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - bf9f0ec

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please smoke test macOS

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please smoke test macOS

@DougGregor
Copy link
Member Author

@swift-ci please test Windows

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

2 similar comments
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@gottesmm
Copy link
Contributor

@swift-ci test windows platform

@DougGregor DougGregor merged commit ee41df0 into swiftlang:master Jun 20, 2020
@DougGregor DougGregor deleted the build-script-swift-driver branch June 20, 2020 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants