summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-07-19 19:36:03 +0000
committerChad Rosier <mcrosier@apple.com>2011-07-19 19:36:03 +0000
commitdcf77320654d367bd59d65dffe1adbe59332d30d (patch)
tree5dbf2b607865d458bff44ca22a509379821be8d3
parent7c09e3c3f339161f8c814aceccb9ed2e97b1d412 (diff)
downloadbcm5719-llvm-dcf77320654d367bd59d65dffe1adbe59332d30d.tar.gz
bcm5719-llvm-dcf77320654d367bd59d65dffe1adbe59332d30d.zip
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 llvm-svn: 135502
-rw-r--r--clang/lib/Basic/Targets.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index 3518ea6f798..2a68d68ee67 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud