mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Differentiate between Win32 and MinGW.
Removes also serach for OS name windows because this is unsupported by LLVM.
This commit is contained in:
@@ -469,7 +469,7 @@ LDC_TARGETS
|
||||
}
|
||||
else
|
||||
{
|
||||
global.params.targetTriple = mTargetTriple.c_str();
|
||||
global.params.targetTriple = llvm::Triple::normalize(mTargetTriple).c_str();
|
||||
}
|
||||
|
||||
std::string triple = global.params.targetTriple;
|
||||
@@ -606,8 +606,17 @@ LDC_TARGETS
|
||||
size_t npos = std::string::npos;
|
||||
|
||||
// windows
|
||||
// FIXME: win64
|
||||
if (triple.find("windows") != npos || triple.find("win32") != npos || triple.find("mingw") != npos)
|
||||
if (triple.find("win32") != npos)
|
||||
{
|
||||
global.params.os = OSWindows;
|
||||
VersionCondition::addPredefinedGlobalIdent("Windows");
|
||||
VersionCondition::addPredefinedGlobalIdent("Win32");
|
||||
if (global.params.is64bit) {
|
||||
VersionCondition::addPredefinedGlobalIdent("Win64");
|
||||
}
|
||||
}
|
||||
// FIXME: mingw
|
||||
else if (triple.find("mingw") != npos)
|
||||
{
|
||||
global.params.os = OSWindows;
|
||||
VersionCondition::addPredefinedGlobalIdent("Windows");
|
||||
|
||||
Reference in New Issue
Block a user