Skip to content

[SYCL] Add in-source versioning for DPCPP compiler#21570

Merged
sarnex merged 3 commits intointel:syclfrom
elizabethandrews:DPCPPVersion
Mar 23, 2026
Merged

[SYCL] Add in-source versioning for DPCPP compiler#21570
sarnex merged 3 commits intointel:syclfrom
elizabethandrews:DPCPPVersion

Conversation

@elizabethandrews
Copy link
Copy Markdown
Contributor

@elizabethandrews elizabethandrews commented Mar 19, 2026

DPC++ Version Information is now stored in compiler source. clang --version will continue to display build information when local CI is used (i.e. SYCL_BUILD_INFO is defined), but will display in-source version otherwise.

cmake/Modules/DPCPPVersion.cmake should be updated to hold version information for each release.

Example Output:

DPC++ compiler 6.3.0 build based on:
clang version 23.0.0git (https://github.com/intel/llvm.git 5947c2aff087f88c90dcd56857405270ff0d4010)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: */releasebuild/bin
Build config: +assertion

Fixes: #21510

cmake/Modules/DPCPPVersion.cmake should be updated to hold
version information for each release.
@elizabethandrews elizabethandrews requested review from a team and bader as code owners March 19, 2026 14:43
@elizabethandrews
Copy link
Copy Markdown
Contributor Author

elizabethandrews commented Mar 19, 2026

@tahonermann I am unable to add you as a reviewer for some reason

Comment thread cmake/Modules/DPCPPVersion.cmake
Comment thread clang/lib/Basic/Version.cpp
Copy link
Copy Markdown
Contributor

@mdtoguchi mdtoguchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK for driver

Copy link
Copy Markdown
Contributor

@YuriPlyakhin YuriPlyakhin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

llvm/CMakeLists.txt change LGTM

@elizabethandrews
Copy link
Copy Markdown
Contributor Author

I think I have addressed all review comments. The latest commit adds a pre-release indicator. The commit also changes the --version output with SYCL_BUILD_INFO to include version information

@premanandrao
Copy link
Copy Markdown
Contributor

DPC++ Version Information is now stored in compiler source. clang --version will continue to display build information when local CI is used (i.e. SYCL_BUILD_INFO is defined), but will display in-source version otherwise.

cmake/Modules/DPCPPVersion.cmake should be updated to hold version information for each release.

Example Output:

DPC++ compiler 6.3.0 build based on:
clang version 23.0.0git (https://github.com/intel/llvm.git 5947c2aff087f88c90dcd56857405270ff0d4010)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: */releasebuild/bin
Build config: +assertion

Fixes: #21510 JIRA: 74112

Please remove Jira info from the description.

Copy link
Copy Markdown
Contributor

@premanandrao premanandrao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okay to me.

Copy link
Copy Markdown
Contributor

@tahonermann tahonermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. I added two comments that you can ignore or address in whatever way you feel is best. I don't need to review again.

Comment thread clang/lib/Basic/Version.cpp
Comment thread cmake/Modules/DPCPPVersion.cmake Outdated
Copy link
Copy Markdown
Contributor

@dvrogozh dvrogozh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elizabethandrews
Copy link
Copy Markdown
Contributor Author

DPC++ Version Information is now stored in compiler source. clang --version will continue to display build information when local CI is used (i.e. SYCL_BUILD_INFO is defined), but will display in-source version otherwise.
cmake/Modules/DPCPPVersion.cmake should be updated to hold version information for each release.
Example Output:

DPC++ compiler 6.3.0 build based on:
clang version 23.0.0git (https://github.com/intel/llvm.git 5947c2aff087f88c90dcd56857405270ff0d4010)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: */releasebuild/bin
Build config: +assertion

Fixes: #21510 JIRA: 74112

Please remove Jira info from the description.

@premanandrao the current guidelines allow us to mention the JIRA number without the link. I think it is useful to have this information in the log.

@elizabethandrews
Copy link
Copy Markdown
Contributor Author

DPC++ Version Information is now stored in compiler source. clang --version will continue to display build information when local CI is used (i.e. SYCL_BUILD_INFO is defined), but will display in-source version otherwise.
cmake/Modules/DPCPPVersion.cmake should be updated to hold version information for each release.
Example Output:

DPC++ compiler 6.3.0 build based on:
clang version 23.0.0git (https://github.com/intel/llvm.git 5947c2aff087f88c90dcd56857405270ff0d4010)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: */releasebuild/bin
Build config: +assertion

Fixes: #21510 JIRA: 74112

Please remove Jira info from the description.

@premanandrao the current guidelines allow us to mention the JIRA number without the link. I think it is useful to have this information in the log.

I am not 100% certain though. I heard this in a call this week but I didn't verify with someone else. So I will remove it to be safe. Can someone else in this review weigh in just so I know.

@tahonermann
Copy link
Copy Markdown
Contributor

I am not 100% certain though. I heard this in a call this week but I didn't verify with someone else. So I will remove it to be safe. Can someone else in this review weigh in just so I know.

I don't know what the policy is for intel/llvm, but upstream LLVM policy was changed a while ago to explicitly allow mention of private metadata in commit messages (https://llvm.org/docs/DeveloperPolicy.html#commit-messages).

@sarnex
Copy link
Copy Markdown
Contributor

sarnex commented Mar 23, 2026

Merging based on request from @elizabethandrews

@sarnex sarnex merged commit 4b59d98 into intel:sycl Mar 23, 2026
31 checks passed
sarnex pushed a commit that referenced this pull request Mar 23, 2026
Adds DPC++ compiler self-identification macros to differentiate
intel/llvm compiler from upstream Clang and enable version detection for
intel/llvm releases.
Fixes:#21509
Depends on: #21570
KornevNikita pushed a commit to KornevNikita/llvm that referenced this pull request Apr 8, 2026
DPC++ Version Information is now stored in compiler source. clang
--version will continue to display build information when local CI is
used (i.e. SYCL_BUILD_INFO is defined), but will display in-source
version otherwise.

cmake/Modules/DPCPPVersion.cmake should be updated to hold version
information for each release.

Example Output:
```
DPC++ compiler 6.3.0 build based on:
clang version 23.0.0git (https://github.com/intel/llvm.git 5947c2a)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: */releasebuild/bin
Build config: +assertion
```

Fixes: intel#21510
KornevNikita pushed a commit to KornevNikita/llvm that referenced this pull request Apr 8, 2026
Adds DPC++ compiler self-identification macros to differentiate
intel/llvm compiler from upstream Clang and enable version detection for
intel/llvm releases.
Fixes:intel#21509
Depends on: intel#21570
KornevNikita added a commit that referenced this pull request Apr 13, 2026
Cherry-pick patches adding version macros:
#21570
#21572
#21610
#21702

And also remove some info from the workflow file, since it's placed in
the source code now.

---------

Co-authored-by: elizabethandrews <elizabeth.andrews@intel.com>
Co-authored-by: ykhatav <yashasvi.khatavkar@intel.com>
KornevNikita pushed a commit that referenced this pull request Apr 17, 2026
DPC++ Version Information is now stored in compiler source. clang
--version will continue to display build information when local CI is
used (i.e. SYCL_BUILD_INFO is defined), but will display in-source
version otherwise.

cmake/Modules/DPCPPVersion.cmake should be updated to hold version
information for each release.

Example Output:
```
DPC++ compiler 6.3.0 build based on:
clang version 23.0.0git (https://github.com/intel/llvm.git 5947c2a)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: */releasebuild/bin
Build config: +assertion
```

Fixes: #21510
KornevNikita pushed a commit that referenced this pull request Apr 17, 2026
Adds DPC++ compiler self-identification macros to differentiate
intel/llvm compiler from upstream Clang and enable version detection for
intel/llvm releases.
Fixes:#21509
Depends on: #21570
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release compiler build is missing name and versioning as of --version

7 participants