-
Notifications
You must be signed in to change notification settings - Fork 823
[SYCL] Add Self macro versioning #21572
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -146,6 +146,19 @@ std::string getClangFullCPPVersion() { | |||||||||||
|
|
||||||||||||
| return buf; | ||||||||||||
| } | ||||||||||||
| std::string getDPCPPFullCPPVersion() { | ||||||||||||
| // Format: "DPC++ 6.3.0 git (https://github.com/intel/llvm.git ...)" | ||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This string looks like an example of the format rather than a format itself.
Suggested change
|
||||||||||||
| std::string buf; | ||||||||||||
| llvm::raw_string_ostream OS(buf); | ||||||||||||
| OS << "DPC++ " DPCPP_VERSION; | ||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know that this was already merged, but perhaps we should follow up with an additional change to add the pre-release indicator here.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll create a follow-up PR. Just to confirm the output format for pre-release, does the following look good? "DPC++ 7.0.0 (pre-release) git (https://github.com/intel/llvm.git ...)"
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that looks great! |
||||||||||||
|
|
||||||||||||
| std::string repo = getClangFullRepositoryVersion(); | ||||||||||||
| if (!repo.empty()) { | ||||||||||||
| OS << " " << repo; | ||||||||||||
| } | ||||||||||||
|
Comment on lines
+156
to
+158
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
|
|
||||||||||||
| return buf; | ||||||||||||
| } | ||||||||||||
|
|
||||||||||||
| llvm::SmallVector<std::pair<llvm::StringRef, llvm::StringRef>, 2> | ||||||||||||
| getSYCLVersionMacros(const LangOptions &LangOpts) { | ||||||||||||
|
|
||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1192,7 +1192,7 @@ | |||||
| // SPARC:#define __UINT_LEAST8_MAX__ 255 | ||||||
| // SPARC:#define __UINT_LEAST8_TYPE__ unsigned char | ||||||
| // SPARC:#define __USER_LABEL_PREFIX__ | ||||||
| // SPARC:#define __VERSION__ "{{.*}}Clang{{.*}} | ||||||
| // SPARC:#define __VERSION__ "{{.*}}DPC++{{.*}} | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| // SPARC:#define __WCHAR_MAX__ 2147483647 | ||||||
| // SPARC:#define __WCHAR_TYPE__ int | ||||||
| // SPARC:#define __WCHAR_WIDTH__ 32 | ||||||
|
|
@@ -1727,6 +1727,7 @@ | |||||
| // WEBASSEMBLY-NEXT:#define __DBL_MIN__ 2.2250738585072014e-308 | ||||||
| // WEBASSEMBLY-NEXT:#define __DBL_NORM_MAX__ 1.7976931348623157e+308 | ||||||
| // WEBASSEMBLY-NEXT:#define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__ | ||||||
| // WEBASSEMBLY-NEXT:#define __DPCPP__ 1 | ||||||
| // WEBASSEMBLY-NOT:#define __ELF__ | ||||||
| // EMSCRIPTEN-THREADS-NEXT:#define __EMSCRIPTEN_PTHREADS__ 1 | ||||||
| // EMSCRIPTEN-NEXT:#define __EMSCRIPTEN__ 1 | ||||||
|
|
@@ -2090,6 +2091,9 @@ | |||||
| // WEBASSEMBLY-NEXT:#define __clang_patchlevel__ {{.*}} | ||||||
| // WEBASSEMBLY-NEXT:#define __clang_version__ "{{.*}}" | ||||||
| // WEBASSEMBLY-NEXT:#define __clang_wide_literal_encoding__ {{.*}} | ||||||
| // WEBASSEMBLY-NEXT:#define __dpcpp_major__ 7 | ||||||
| // WEBASSEMBLY-NEXT:#define __dpcpp_minor__ 0 | ||||||
| // WEBASSEMBLY-NEXT:#define __dpcpp_patchlevel__ 0 | ||||||
| // WEBASSEMBLY-NEXT:#define __llvm__ 1 | ||||||
| // WASI-NOT:#define __unix | ||||||
| // WASI-NOT:#define __unix__ | ||||||
|
|
||||||
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.