File tree Expand file tree Collapse file tree 8 files changed +43
-2
lines changed Expand file tree Collapse file tree 8 files changed +43
-2
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ jobs:
183183 id : build
184184 # Emulate default value for manual dispatch as we've run out of available arguments.
185185 run : cmake --build $GITHUB_WORKSPACE/build --target ${{ inputs.build_target || 'sycl-toolchain' }}
186+ - run : $GITHUB_WORKSPACE/build/bin/clang++ --version
186187 - name : check-llvm
187188 if : always() && !cancelled() && contains(inputs.changes, 'llvm')
188189 run : |
Original file line number Diff line number Diff line change @@ -2,17 +2,37 @@ name: SYCL Release Branch Nightly
22
33on :
44 workflow_dispatch :
5+ inputs :
6+ sycl_build_info :
57
68permissions : read-all
79
810jobs :
11+ get_build_info :
12+ runs-on : ubuntu-latest
13+ outputs :
14+ info : ${{ steps.get_info.outputs.info }}
15+ steps :
16+ # TODO: version detection can be automated, e.g. by using branch name.
17+ - id : get_info
18+ run : |
19+ if [ -n "${{ inputs.sycl_build_info }}" ]; then
20+ echo "info=${{ inputs.sycl_build_info }}" >> $GITHUB_OUTPUT
21+ else
22+ date=$(date +'%Y-%m-%d')
23+ version="6.3.0"
24+ info="Nightly $date $version pre-release"
25+ echo "info=$info" >> $GITHUB_OUTPUT
26+ fi
27+
928 ubuntu2204_build :
29+ needs : get_build_info
1030 uses : ./.github/workflows/sycl-linux-build.yml
1131 secrets : inherit
1232 with :
1333 build_cache_root : " /__w/"
1434 build_artifact_suffix : default
15- build_configure_extra_args : ' -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_LIBDIR=lib --disable-jit --no-assertions --add_security_flags=sanitize --hip --cuda'
35+ build_configure_extra_args : ' -DSYCL_BUILD_INFO="${{ needs.get_build_info.outputs.info }}" - DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_LIBDIR=lib --disable-jit --no-assertions --add_security_flags=sanitize --hip --cuda'
1636 build_image : ghcr.io/intel/llvm/release_build:latest
1737 pack_release : ' true'
1838
7898 sycl_toolchain_decompress_command : ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }}
7999
80100 build-win :
101+ needs : get_build_info
81102 uses : ./.github/workflows/sycl-windows-build.yml
82103 with :
83- build_configure_extra_args : ' -DLLVM_SPIRV_ENABLE_LIBSPIRV_DIS=off -DCMAKE_POSITION_INDEPENDENT_CODE=ON --disable-jit --no-assertions --add_security_flags=sanitize'
104+ build_configure_extra_args : ' -DSYCL_BUILD_INFO="${{ needs.get_build_info.outputs.info }}" - DLLVM_SPIRV_ENABLE_LIBSPIRV_DIS=off -DCMAKE_POSITION_INDEPENDENT_CODE=ON --disable-jit --no-assertions --add_security_flags=sanitize'
84105 pack_release : ' true'
85106
86107 # We upload both Linux/Windows build via Github's "Releases"
Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ jobs:
153153 shell : bash
154154 run : |
155155 cmake --build build --target ${{ inputs.build_target }}
156+ - run : build/bin/clang++ --version
156157 - name : check-llvm
157158 if : always() && !cancelled() && contains(inputs.changes, 'llvm')
158159 shell : bash
Original file line number Diff line number Diff line change @@ -66,6 +66,9 @@ namespace clang {
6666 // / the CL_SYCL_LANGUAGE_VERSION and SYCL_LANGUAGE_VERSION macros.
6767 llvm::SmallVector<std::pair<llvm::StringRef, llvm::StringRef>, 2 >
6868 getSYCLVersionMacros (const LangOptions &LangOpts);
69+
70+ // / Retrieves a string representing the Intel SYCL compiler build info.
71+ std::string getSYCLBuildInfo ();
6972}
7073
7174#endif // LLVM_CLANG_BASIC_VERSION_H
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ add_custom_command(OUTPUT "${version_inc}"
4242 "-DLLVM_VC_REVISION=${llvm_vc_revision} "
4343 "-DLLVM_FORCE_VC_REVISION=${LLVM_FORCE_VC_REVISION} "
4444 "-DLLVM_FORCE_VC_REPOSITORY=${LLVM_FORCE_VC_REPOSITORY} "
45+ "-DSYCL_BUILD_INFO=${SYCL_BUILD_INFO} "
4546 -P "${generate_vcs_version_script} " )
4647
4748# Mark the generated header as being generated.
Original file line number Diff line number Diff line change @@ -65,6 +65,14 @@ std::string getClangVendor() {
6565#endif
6666}
6767
68+ std::string getSYCLBuildInfo () {
69+ #ifdef SYCL_BUILD_INFO
70+ return SYCL_BUILD_INFO;
71+ #else
72+ return " development" ;
73+ #endif
74+ }
75+
6876std::string getClangFullRepositoryVersion () {
6977 std::string buf;
7078 llvm::raw_string_ostream OS (buf);
Original file line number Diff line number Diff line change @@ -2825,6 +2825,7 @@ void Driver::PrintSYCLToolHelp(const Compilation &C) const {
28252825}
28262826
28272827void Driver::PrintVersion (const Compilation &C, raw_ostream &OS) const {
2828+ OS << " Intel SYCL compiler " << getSYCLBuildInfo () << " build based on:\n " ;
28282829 if (IsFlangMode ()) {
28292830 OS << getClangToolFullVersion (" flang" ) << ' \n ' ;
28302831 } else {
Original file line number Diff line number Diff line change @@ -56,6 +56,11 @@ foreach(name IN LISTS NAMES)
5656 append_info(${name} "${revision} " "${repository} " )
5757endforeach ()
5858
59+ if (SYCL_BUILD_INFO)
60+ file (APPEND "${HEADER_FILE} .tmp"
61+ "#define SYCL_BUILD_INFO \" ${SYCL_BUILD_INFO} \"\n " )
62+ endif ()
63+
5964# Copy the file only if it has changed.
6065execute_process (COMMAND ${CMAKE_COMMAND} -E copy_if_different
6166 "${HEADER_FILE} .tmp" "${HEADER_FILE} " )
You can’t perform that action at this time.
0 commit comments