Conversation
|
CC: @tahonermann , @dvrogozh |
YuriPlyakhin
left a comment
There was a problem hiding this comment.
llvm/CMakeLists.txt change LGTM
dbdd3fe to
74d4e93
Compare
74d4e93 to
4acb486
Compare
tahonermann
left a comment
There was a problem hiding this comment.
Looks good to me.
Once these changes go into an official release, we should submit a PR to https://github.com/cpredef/predef/blob/master/Compilers.md to document these macros.
| // Format: "DPC++ 6.3.0 git (https://github.com/intel/llvm.git ...)" | ||
| std::string buf; | ||
| llvm::raw_string_ostream OS(buf); | ||
| OS << "DPC++ " DPCPP_VERSION; |
There was a problem hiding this comment.
I know that this was already merged, but perhaps we should follow up with an additional change to add the pre-release indicator here.
There was a problem hiding this comment.
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 ...)"
There was a problem hiding this comment.
Yes, that looks great!
This is a follow-up PR after- #21572 to add pre-release indicator to the text of the __VERSION__ macro so that it matches the --version output.
| } | ||
| std::string getDPCPPFullCPPVersion() { |
There was a problem hiding this comment.
| } | |
| std::string getDPCPPFullCPPVersion() { | |
| } | |
| std::string getDPCPPFullCPPVersion() { |
| return buf; | ||
| } | ||
| std::string getDPCPPFullCPPVersion() { | ||
| // Format: "DPC++ 6.3.0 git (https://github.com/intel/llvm.git ...)" |
There was a problem hiding this comment.
This string looks like an example of the format rather than a format itself.
| // Format: "DPC++ 6.3.0 git (https://github.com/intel/llvm.git ...)" | |
| // Format example: "DPC++ 6.3.0 git (https://github.com/intel/llvm.git ...)" |
| if (!repo.empty()) { | ||
| OS << " " << repo; | ||
| } |
There was a problem hiding this comment.
| if (!repo.empty()) { | |
| OS << " " << repo; | |
| } | |
| if (!repo.empty()) | |
| OS << " " << repo; |
| // SPARC:#define __UINT_LEAST8_TYPE__ unsigned char | ||
| // SPARC:#define __USER_LABEL_PREFIX__ | ||
| // SPARC:#define __VERSION__ "{{.*}}Clang{{.*}} | ||
| // SPARC:#define __VERSION__ "{{.*}}DPC++{{.*}} |
There was a problem hiding this comment.
| // SPARC:#define __VERSION__ "{{.*}}DPC++{{.*}} | |
| // SPARC:#define __VERSION__ "{{.*}}DPC++{{.*}}" |
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
This is a follow-up PR after- intel#21572 to add pre-release indicator to the text of the __VERSION__ macro so that it matches the --version output.
This is a follow-up PR after- #21572 to add pre-release indicator to the text of the __VERSION__ macro so that it matches the --version output.
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