mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 09:00:33 +03:00
FreeBSD targets: Predefine version FreeBSD_<major>
As newly required for druntime.
This commit is contained in:
parent
84a88ca9ec
commit
1ca4b9332b
1 changed files with 6 additions and 0 deletions
|
@ -779,6 +779,12 @@ void registerPredefinedTargetVersions() {
|
||||||
break;
|
break;
|
||||||
case llvm::Triple::FreeBSD:
|
case llvm::Triple::FreeBSD:
|
||||||
VersionCondition::addPredefinedGlobalIdent("FreeBSD");
|
VersionCondition::addPredefinedGlobalIdent("FreeBSD");
|
||||||
|
if (unsigned major = triple.getOSMajorVersion()) {
|
||||||
|
const auto withMajor = "FreeBSD_" + std::to_string(major);
|
||||||
|
VersionCondition::addPredefinedGlobalIdent(withMajor.c_str());
|
||||||
|
} else {
|
||||||
|
warning(Loc(), "FreeBSD major version not specified in target triple");
|
||||||
|
}
|
||||||
VersionCondition::addPredefinedGlobalIdent("Posix");
|
VersionCondition::addPredefinedGlobalIdent("Posix");
|
||||||
VersionCondition::addPredefinedGlobalIdent("CppRuntime_Clang");
|
VersionCondition::addPredefinedGlobalIdent("CppRuntime_Clang");
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue