-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[CMake] adjust clang resource dir symlinks to new path #66983
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
[CMake] adjust clang resource dir symlinks to new path #66983
Conversation
@swift-ci please test |
macOS is failing with expected errors related to |
Windows seems failing to build LLVM
|
Linux will require building a newer CMake
Update tracked in #67018 |
The Windows issue sounds similar to the reported at dotnet/runtime#50342, which suggest we may need to use a newer Windows 10 SDK |
Before retesting Linux, waiting for #67018 |
This is actually interesting. LLVM should be using |
@swift-ci please test macOS |
@swift-ci please test Windows |
@swift-ci please clean test macOS |
@swift-ci please clean test Windows |
I can repro this failure locally if I use Xcode 14.2 to build |
@swift-ci please test |
We will likely run into this error here since LLVM requires a newer CMake version:
|
Investigated at desk the Windows failure -- this is related to the enablement of the standard conforming preprocessor in LLVM According to the related review, we would need 10.0.20348.0 or later -- this is further confirmed in other blog posts as well |
@swift-ci please test Linux |
@swift-ci please test macOS |
@@ -94,7 +91,8 @@ if(NOT SWIFT_INCLUDE_TOOLS AND | |||
endif() | |||
message(STATUS "Using clang Resource Directory: ${clang_headers_location}") | |||
else() | |||
set(clang_headers_location "${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}") | |||
# ... or the one we just built | |||
set(clang_headers_location "${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${LLVM_VERSION_MAJOR}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these (this and the one down on line 206) be CLANG_VERSION_MAJOR
instead of LLVM_VERSION_MAJOR
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point -- I wrongly assumed they are set to the same value, but that could not be the case (as per llvm/llvm-project@ebfc680)
Since CLANG_VERSION_MAJOR
is not reexported by ClangConfig.cmake
, I need to update the check before as well to ensure we specify that when configuring the Swift build system.
Addressed this in 6b3ecfb
a778b1e
to
6b3ecfb
Compare
@swift-ci please test |
6b3ecfb
to
99fb4e1
Compare
@swift-ci please test |
As a result of llvm/llvm-project@e1b88c8a09be we should expect it to contain only the major version, not the full one -- that is, we should expect it to be ``` ../lib/clang/CLANG_VERSION_MAJOR ``` instead of ``` ../lib/clang/CLANG_VERSION_MAJOR.CLANG_VERSION_MINOR.CLANG_VERSION_PATCH ``` Also update the logic to levarage directly the Clang version -- this can be different from the LLVM one (as per llvm/llvm-project@ebfc680) Addresses rdar://111452821
99fb4e1
to
47cd49d
Compare
@swift-ci please test |
@swift-ci please test |
1 similar comment
@swift-ci please test |
@swift-ci please test Linux |
1 similar comment
@swift-ci please test Linux |
As a result of llvm/llvm-project@e1b88c8a09be we should expect it to contain only the major version, not the full one -- that is, we should expect it to be
instead of
Also update the logic to levarage directly the Clang version -- this can
be different from the LLVM one (as per
llvm/llvm-project@ebfc680)
Addresses rdar://111452821