File tree Expand file tree Collapse file tree 7 files changed +20
-2
lines changed Expand file tree Collapse file tree 7 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,7 @@ jobs:
209209 id : build
210210 # Emulate default value for manual dispatch as we've run out of available arguments.
211211 run : cmake --build $GITHUB_WORKSPACE/build --target ${{ inputs.build_target || 'sycl-toolchain' }}
212+ - run : $GITHUB_WORKSPACE/build/clang++ --version
212213 - name : check-llvm
213214 if : always() && !cancelled() && contains(inputs.changes, 'llvm')
214215 env :
Original file line number Diff line number Diff line change 2929 secrets : inherit
3030 with :
3131 build_cache_root : " /__w/"
32- build_configure_extra_args : ' --hip --cuda'
32+ build_configure_extra_args : ' --hip --cuda -DSYCL_BUILD_INFO="Nightly" '
3333 build_image : ghcr.io/intel/llvm/ubuntu2204_build:latest
3434
3535 retention-days : 90
@@ -191,7 +191,7 @@ jobs:
191191 # functionality, make sure Linux/Windows names follow the same pattern.
192192 toolchain_artifact_filename : sycl_windows.tar.gz
193193 # Disable the spirv-dis requirement as to not require SPIR-V Tools.
194- build_configure_extra_args : -DLLVM_SPIRV_ENABLE_LIBSPIRV_DIS=off
194+ build_configure_extra_args : -DLLVM_SPIRV_ENABLE_LIBSPIRV_DIS=off -DSYCL_BUILD_INFO="Nightly"
195195 build_target : all
196196
197197 e2e-win :
Original file line number Diff line number Diff line change @@ -159,6 +159,7 @@ jobs:
159159 shell : bash
160160 run : |
161161 cmake --build build --target ${{ inputs.build_target }}
162+ - run : build/clang++ --version
162163 - name : check-llvm
163164 if : always() && !cancelled() && contains(inputs.changes, 'llvm')
164165 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 @@ -44,6 +44,10 @@ add_custom_command(OUTPUT "${version_inc}"
4444 "-DLLVM_FORCE_VC_REPOSITORY=${LLVM_FORCE_VC_REPOSITORY} "
4545 -P "${generate_vcs_version_script} " )
4646
47+ if (SYCL_BUILD_INFO)
48+ file (APPEND ${version_inc} "#define SYCL_BUILD_INFO \" ${SYCL_BUILD_INFO} \"\n " )
49+ endif ()
50+
4751# Mark the generated header as being generated.
4852set_source_files_properties ("${version_inc} "
4953 PROPERTIES GENERATED TRUE
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 @@ -2726,6 +2726,7 @@ void Driver::PrintSYCLToolHelp(const Compilation &C) const {
27262726}
27272727
27282728void Driver::PrintVersion (const Compilation &C, raw_ostream &OS) const {
2729+ OS << " Intel SYCL compiler " << getSYCLBuildInfo () << " build based on:\n " ;
27292730 if (IsFlangMode ()) {
27302731 OS << getClangToolFullVersion (" flang" ) << ' \n ' ;
27312732 } else {
You can’t perform that action at this time.
0 commit comments