-
Notifications
You must be signed in to change notification settings - Fork 794
[SYCL][CI] Improve clang++ version output #20520
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
base: sycl
Are you sure you want to change the base?
Conversation
This patch adds "Nightly build" string to clang version output. Previously it was like: clang version 22.0.0git (https://github.com/intel/llvm.git 2de7d37) Now it looks like: clang version 22.0.0git (https://github.com/intel/llvm.git 2de7d37 Nightly build) I'm preserving the repo path, but extending the revision. Anyways, we need to define both CLANG_VC_REPOSITORY and CLANG_VC_REVISION CMake variables to redefine the output, see: llvm/llvm/cmake/modules/GenerateVersionFromVCS.cmake Moreover, we need to define LLVM_VC_REPOSITORY & LLVM_VC_REVISION, because if it's not the same as CLANG_VC_* variables, there will be two sections of brackets after clang version, like: clang version 22.0.0git (https://github.com/intel/llvm.git 2de7d37) (https://github.com/intel/llvm.git 2de7d37 Nightly build) This is kind of hacky, but it allows as not to change the source code.
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
| -DLLVM_INSTALL_UTILS=ON | ||
| -DLLVM_INSTALL_UTILS=ON \ | ||
| ${{ inputs.build_configure_extra_args }} |
Check failure
Code scanning / zizmor
code injection via template expansion Error
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.
i think youre supposed to put it into an envvar using the env yaml thing and then use the envvar, for some reason that is safer
| build_configure_extra_args: '--hip --cuda' | ||
| build_configure_extra_args: | | ||
| --hip --cuda \ | ||
| -DLLVM_VC_REPOSITORY="${{ github.repositoryUrl }}" -DLLVM_VC_REVISION="${{ github.sha }} Nightly build" \ |
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.
since we're only doing this for the nightly, is there some benefit we get to knowing if someone is using the nightly or not?
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.
I'll also add the same thing for nightly release builds like x.y.z pre-release build and x.y.z release build for official releases, so this is needed to distinguish them.
Why? How is the "nightly build" different from regular non-nightly build? |
What you mean by regular non-nightly build? There is a huge set of options on how to build the toolchain. Nightly builds are built in some specific way, tested properly enough and published. So there is a customer request to make the version info a bit more informative. |
For more details see: #20520 This PR adds branch:hash to nightly builds on release branches. It also allows to specify a custom version manually in case of official release builds, e.g. "6.3.0 release build".
I mean builds done by other workflows (e.g. pre-commit, post-commit, etc.).
What is missing in the current version info? How does you change make it more informative? |
This patch adds "Nightly build" string to clang version output. Previously it was like:
clang version 22.0.0git (https://github.com/intel/llvm.git 2de7d379d6bde64c3b12261a080dc00b1800182c)Now it looks like:
clang version 22.0.0git (https://github.com/intel/llvm.git 2de7d379d6bde64c3b12261a080dc00b1800182c Nightly build)I'm preserving the repo path, but extending the revision. Anyways, we need to define both
CLANG_VC_REPOSITORYandCLANG_VC_REVISIONCMake variables to redefine the output, see: llvm/llvm/cmake/modules/GenerateVersionFromVCS.cmakeMoreover, we also need to define
LLVM_VC_REPOSITORY&LLVM_VC_REVISION, because if it's not the same asCLANG_VC_*variables, there will be two sections of brackets after clang version, like:clang version 22.0.0git (https://github.com/intel/llvm.git 2de7d379d6bde64c3b12261a080dc00b1800182c) (https://github.com/intel/llvm.git 2de7d379d6bde64c3b12261a080dc00b1800182c Nightly build)This is kind of hacky, but it allows as not to change the source code.