Skip to content

Pass CLANG_VERSION_* cmake flags to the LLVM build. #8393

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 1 commit into from
Mar 30, 2017

Conversation

zisko
Copy link
Contributor

@zisko zisko commented Mar 28, 2017

In a normal swiftless clang build, if clang doesnt know CLANG_VERSION_*,
clang's cmake falls back on LLVM_VERSION_*. We pass a CLANG_COMPILER_VERSION
to swift, but it is not necessarily what clang wants to know.

The intention of this CLANG_VERSION_* flag in Clang is to know
what Swift calls clang_user_visible_version. This is the non-specific
version of Clang. For example, clang-900 - clang_user_visible_version is 9.0.0,
while Swift would like clang_compiler_version to be the specific version that the
driver will print out.

See above

Resolves SR-NNNN.
rdar://30452142

@zisko
Copy link
Contributor Author

zisko commented Mar 28, 2017

@swift-ci please smoke test

@zisko zisko assigned erg, llvm-beanz and cooperp and unassigned erg, cooperp and llvm-beanz Mar 28, 2017
@zisko zisko requested review from erg, cooperp and llvm-beanz March 28, 2017 18:25
@erg
Copy link
Contributor

erg commented Mar 28, 2017

Example:

clang_version_number=900.10.20
clang_user_visible_version=9.0.0

@llvm-beanz
Copy link
Contributor

Looks reasonable to me.

@zisko
Copy link
Contributor Author

zisko commented Mar 28, 2017

Oops, need to update the tests!

In a normal swiftless clang build, if it doesnt know CLANG_VERSION_*,
clang's cmake falls back on LLVM_VERSION_*. We pass a CLANG_COMPILER_VERSION
to swift, but it is not necessarily what clang wants to know.

The intention of this CLANG_VERSION_* flag in Clang is to know
what Swift calls clang_user_visible_version. This is the non-specific
version of Clang. For example, clang-900 - this is 9.0.0, while Swift
would like clang_compiler_version to be the specific version that the
driver will print out.

Flag naming!

Fix tests
@zisko zisko force-pushed the what-clang-doesnt-know-will-hurt-it branch from 2053658 to 2647ca2 Compare March 29, 2017 22:57
@zisko
Copy link
Contributor Author

zisko commented Mar 29, 2017

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 2053658950ff5c6107f262e619a5fdeb4f661faf
Test requested by - @zisko

@zisko zisko requested review from rintaro and removed request for cooperp March 29, 2017 23:00
@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 2053658950ff5c6107f262e619a5fdeb4f661faf
Test requested by - @zisko

@erg
Copy link
Contributor

erg commented Mar 30, 2017

@zisko The way to check the tests locally is with nosetests.

cd utils/swift_build_support/tests
nosetests

@erg erg merged commit b559855 into swiftlang:master Mar 30, 2017
@zisko zisko deleted the what-clang-doesnt-know-will-hurt-it branch March 31, 2017 17:10
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.

5 participants