Skip to content

[CMake] Stop re-linking #2404

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

Closed
wants to merge 1 commit into from
Closed

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented May 5, 2016

What's in this pull request?

CC: @dabrahams
https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160404/001621.html

${BUILD_DIR}/lib/Basic/SwiftRevision.inc used to be re-generated every time
git revision "hash" has changed. I feel, that is superfluous while developing.

With this change, {LLVM,Clang,Swift}Revision.inc generation is done
at configure time, instead of build time. That means:

  • Fresh build: build everything normally
  • Rebuild with --reconfigure: re-link and refresh --version output
  • Rebuild without --reconfigure: no re-link and remain old --version output

AFAIK, every CI build has --reconfigure or perform scratch build.
So, this change should not affect CI bot behavior.

I confirmed:

$ utils/build-script -R --reconfigure  # fresh build
[.. build everything ..]
$ git commit --amend  # just change the hash
$ utils/build-script -R --reconfigure
[.. rebuild Version.cpp.o and re-linking ..]
$ vim stdlib/public/core/Algorithm.swift   # add one empty line
$ utils/build-script -R
[.. no re-linking .. build stdlib ..]
$ git commit -a  # change hash
$ utils/build-script -R
[.. rebuild nothing ..]
$ utils/build-script -R --reconfigure
[.. rebuild Version.cpp.o and re-linking ..]
$ utils/build-script -R --reconfigure
[.. rebuild nothing ..]

Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160404/001621.html
Because every time git hash has changed, 'SwiftRevision.inc' used to re-generated.

With this change, generating XXXRevision.inc is moved to configure time,
instead of build time.
If we need to refresh '--version' output, need 'build-script --reconfigure'
@jrose-apple
Copy link
Contributor

I'm concerned about this; it means that in a non-reconfiguring build, the revision hashes are lying to you.

There are also correctness implications; see my previous attempt at making it an option. #2105 (comment)

@rintaro
Copy link
Member Author

rintaro commented May 5, 2016

Oh, I didn't know #2105. Thank you, closing.

@rintaro rintaro closed this May 5, 2016
@jrose-apple
Copy link
Contributor

I would definitely like to make it an option, just not sure how to do so.

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.

2 participants