Skip to content

Commit 940e0dc

Browse files
committed
[SYCL][CI] Improve clang++ version output
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.
1 parent 5df5f45 commit 940e0dc

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

.github/workflows/sycl-linux-build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,11 @@ jobs:
201201
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build \
202202
-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/toolchain \
203203
-t Release \
204-
--ci-defaults --use-zstd ${{ inputs.build_configure_extra_args }} \
204+
--ci-defaults --use-zstd \
205205
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
206206
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
207-
-DLLVM_INSTALL_UTILS=ON
207+
-DLLVM_INSTALL_UTILS=ON \
208+
${{ inputs.build_configure_extra_args }}
208209
- name: Compile
209210
id: build
210211
# Emulate default value for manual dispatch as we've run out of available arguments.

.github/workflows/sycl-nightly.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ jobs:
2929
secrets: inherit
3030
with:
3131
build_cache_root: "/__w/"
32-
build_configure_extra_args: '--hip --cuda'
32+
build_configure_extra_args: |
33+
--hip --cuda \
34+
-DLLVM_VC_REPOSITORY="${{ github.repositoryUrl }}" -DLLVM_VC_REVISION="${{ github.sha }} Nightly build" \
35+
-DCLANG_VC_REPOSITORY="${{ github.repositoryUrl }}" -DCLANG_VC_REVISION="${{ github.sha }} Nightly build"
3336
build_image: ghcr.io/intel/llvm/ubuntu2204_build:latest
3437

3538
retention-days: 90
@@ -191,7 +194,10 @@ jobs:
191194
# functionality, make sure Linux/Windows names follow the same pattern.
192195
toolchain_artifact_filename: sycl_windows.tar.gz
193196
# Disable the spirv-dis requirement as to not require SPIR-V Tools.
194-
build_configure_extra_args: -DLLVM_SPIRV_ENABLE_LIBSPIRV_DIS=off
197+
build_configure_extra_args: |
198+
-DLLVM_SPIRV_ENABLE_LIBSPIRV_DIS=off ^
199+
-DLLVM_VC_REPOSITORY="${{ github.repositoryUrl }}" -DLLVM_VC_REVISION="${{ github.sha }} Nightly build" ^
200+
-DCLANG_VC_REPOSITORY="${{ github.repositoryUrl }}" -DCLANG_VC_REVISION="${{ github.sha }} Nightly build"
195201
build_target: all
196202

197203
e2e-win:

.github/workflows/sycl-windows-build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,14 @@ jobs:
147147
IF NOT EXIST D:\github\_work\cache MKDIR D:\github\_work\cache
148148
IF NOT EXIST D:\github\_work\cache\${{inputs.build_cache_suffix}} MKDIR D:\github\_work\cache\${{inputs.build_cache_suffix}}
149149
python.exe src/buildbot/configure.py -o build ^
150-
--ci-defaults --use-zstd %ARGS% ^
150+
--ci-defaults --use-zstd ^
151151
"-DCMAKE_C_COMPILER=${{inputs.cxx}}" ^
152152
"-DCMAKE_CXX_COMPILER=${{inputs.cxx}}" ^
153153
"-DCMAKE_INSTALL_PREFIX=%GITHUB_WORKSPACE%\install" ^
154154
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache ^
155155
-DCMAKE_C_COMPILER_LAUNCHER=ccache ^
156-
-DLLVM_INSTALL_UTILS=ON
156+
-DLLVM_INSTALL_UTILS=ON ^
157+
%ARGS%
157158
- name: Build
158159
id: build
159160
shell: bash

0 commit comments

Comments
 (0)