Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Basic] Use new GetSVN.cmake parameters #10824

Closed

Conversation

modocache
Copy link
Collaborator

This should be merged only after LLVM revision D35133 (or some version of it) is merged into LLVM upstream, and pulled down into apple/swift-llvm. In the meantime, however, I think this patch demonstrates why D35133 is useful, so I'd like to submit it for review.

@jrose-apple, feel free to review either of the patches! 馃檱


LLVM's GetSVN.cmake is capable of finding the remote URL and revision of one repository, using the FIRST_SOURCE_DIR/FIRST_NAME parameters, and optionally a second one, using the optional SECOND_SOURCE_DIR/SECOND_NAME parameters. Because Swift requires source control information for three repositories, it calls GetSVN.cmake three times, with three FIRST_SOURCE_DIR/FIRST_NAME parameters.

LLVM https://reviews.llvm.org/D35132 modifies GetSVN.cmake such that it can take any number of SOURCE_DIRS and NAMES, instead of just one (or two). Use these new parameters to simplify the CMake in swift/lib/Basic/CMakeLists.txt.

There's one other change here: instead of creating three files (LLVMRevision.inc, ClangRevision.inc, and SwiftRevision.inc), as of this diff only one is created: Revision.inc. There is no difference in functionality -- swift::printFullRevisionString() behaves the same, even when revision information for only a subset of repositories is found.

LLVM's GetSVN.cmake is capable of finding the remote URL and revision
of one repository, using the `FIRST_SOURCE_DIR`/`FIRST_NAME`
parameters, and optionally a second one, using the optional
`SECOND_SOURCE_DIR`/`SECOND_NAME` parameters. Because Swift requires
source control information for *three* repositories, it calls
GetSVN.cmake three times, with three `FIRST_SOURCE_DIR`/`FIRST_NAME`
parameters.

LLVM https://reviews.llvm.org/D35132 modifies GetSVN.cmake such that it
can take any number of `SOURCE_DIRS` and `NAMES`, instead of just one
(or two). Use these new parameters to simplify the CMake in
swift/lib/Basic/CMakeLists.txt.

There's one other change here: instead of creating three files
(LLVMRevision.inc, ClangRevision.inc, and SwiftRevision.inc), as of
this diff only one is created: Revision.inc. There is no difference in
functionality -- `swift::printFullRevisionString()` behaves the same,
even when revision information for only a subset of repositories is
found.
@modocache
Copy link
Collaborator Author

@jrose-apple, do you have any suggestions for reviewers for https://reviews.llvm.org/D35132, https://reviews.llvm.org/D35133, and https://reviews.llvm.org/D35138?

@jrose-apple
Copy link
Contributor

ChrisB was my suggestion too.

This is fine to go in if/when the LLVM change goes in.

@CodaFi
Copy link
Member

CodaFi commented Nov 11, 2019

Seems like this would take significant reworking to get up-to-date with the monorepo work. I could be very very wrong. Please reopen this and rebase it if that is the case.

@CodaFi CodaFi closed this Nov 11, 2019
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.

None yet

3 participants