Add the distribution tag to -print-target-info

Ideally this would also update the `--version` output to be overridden
by `SWIFT_TOOLCHAIN_VERSION`, but unfortunately various tools rely on
the current format (eg. swift-build).

(cherry picked from commit 3c098782b4)
This commit is contained in:
Ben Barham
2025-05-21 17:11:32 -07:00
parent fbd2b8d411
commit 1f53e700fa
7 changed files with 24 additions and 23 deletions

View File

@@ -304,17 +304,9 @@ StringRef getSwiftRevision() {
#endif
}
bool isCurrentCompilerTagged() {
#ifdef SWIFT_COMPILER_VERSION
return true;
#else
return false;
#endif
}
StringRef getCurrentCompilerTag() {
#ifdef SWIFT_COMPILER_VERSION
return SWIFT_COMPILER_VERSION;
#ifdef SWIFT_TOOLCHAIN_VERSION
return SWIFT_TOOLCHAIN_VERSION;
#else
return StringRef();
#endif