From b536a1565c9d72a8caacf75d97dffd19cb2777ad Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Tue, 19 Jul 2011 19:36:03 +0000 Subject: [PATCH] Clang asserts "Invalid environment!" when using -ccc-host-triple arch-pc-win32-macho (e.g., x86_64-pc-win32-macho), which appears to be a false positive. rdar://9786307 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135502 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Basic/Targets.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 3518ea6f79..2a68d68ee6 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -157,6 +157,10 @@ static void getDarwinDefines(MacroBuilder &Builder, const LangOptions &Opts, Str[4] = '0' + (Rev % 10); Str[5] = '\0'; Builder.defineMacro("__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__", Str); + } else if (PlatformName == "win32") { + // Due to option -ccc-host-triple arch-pc-win32-macho. + // Don't emit __ENVIRONMENT_XX_OS_VERSION_MIN_REQUIRED__ as we're generating + // code for Win32 ABI. } else { // Note that the Driver allows versions which aren't representable in the // define (because we only get a single digit for the minor and micro -- 2.40.0