summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/darwin-ld.c
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2014-02-01 21:06:21 +0000
committerBob Wilson <bob.wilson@apple.com>2014-02-01 21:06:21 +0000
commit5cfc55e49fefec6fae6ebbd1b99a84aa439c9eb8 (patch)
tree9f39b003e7dfd39cb3f45614473942142ebd4a98 /clang/test/Driver/darwin-ld.c
parent52b6473d74acaffb9b7a8acfc8fdcd8b5f45a559 (diff)
downloadbcm5719-llvm-5cfc55e49fefec6fae6ebbd1b99a84aa439c9eb8.tar.gz
bcm5719-llvm-5cfc55e49fefec6fae6ebbd1b99a84aa439c9eb8.zip
Fix an assertion failure when building for the iOS simulator. rdar://15959009
When building for i386 or x86_64 with IPHONEOS_DEPLOYMENT_TARGET set in the environment, the toolchain correctly recognizes that the target platform is the iOS simulator. The code in Darwin::addMinVersionArgs was not updated for svn 197148, where isTargetIPhoneOS() was widely replaced by isTargetIOSBased(). This is kind of a strange case, though, because we probably ought to be passing -ios_simulator_version_min to the linker, but according to the FIXME in the code, we intentionally avoid that unless the -mios-simulator-version-min option was used. I don't know whether it is safe to change that yet, so for now, I am just fixing the assertion failure. llvm-svn: 200618
Diffstat (limited to 'clang/test/Driver/darwin-ld.c')
-rw-r--r--clang/test/Driver/darwin-ld.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Driver/darwin-ld.c b/clang/test/Driver/darwin-ld.c
index 25b28d6e7db..6318ead41da 100644
--- a/clang/test/Driver/darwin-ld.c
+++ b/clang/test/Driver/darwin-ld.c
@@ -173,3 +173,11 @@
//
// LINK_X86_64H_MULTIARCH: {{ld(.exe)?"}}
// LINK_X86_64H_MULTIARCH: "x86_64h"
+
+// Check that clang passes -iphoneos_version_min to the linker when building
+// for the iOS simulator but when -mios-simulator-version-min is not
+// explicitly specified (<rdar://problem/15959009>).
+// RUN: env IPHONEOS_DEPLOYMENT_TARGET=7.0 \
+// RUN: %clang -target i386-apple-darwin -### %t.o 2> %t.log
+// RUN: FileCheck -check-prefix=LINK_IPHONEOS_VERSION_MIN %s < %t.log
+// LINK_IPHONEOS_VERSION_MIN: -iphoneos_version_min
OpenPOWER on IntegriCloud