[PATCH] D71579: [driver][darwin] Pass -platform_version flag to the linker instead of the -_version_min flag

2020-02-12 Thread dmajor via Phabricator via cfe-commits
dmajor added inline comments.



Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:339
   // Add the deployment target.
-  MachOTC.addMinVersionArgs(Args, CmdArgs);
+  if (!Version[0] || Version[0] >= 520)
+MachOTC.addPlatformVersionArgs(Args, CmdArgs);

arphaman wrote:
> steven_wu wrote:
> > Why version '0' should go through the new path?
> Version `0` indicates that `-mlinker-version=` wasn't specified. We want to 
> use the new flag by default.
Hi. Just for anyone who isn't on the bugzilla thread: in 
https://bugs.llvm.org/show_bug.cgi?id=44813 I'd like to reconsider this 
decision about using the flag by default. It is a breaking change and is 
inconsistent with the other treatments of `Version` in this function. What do 
you all think? Thanks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71579/new/

https://reviews.llvm.org/D71579



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D71579: [driver][darwin] Pass -platform_version flag to the linker instead of the -_version_min flag

2019-12-17 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment.

@phosek I fixed the tests in be88a20c900463c4919433109e4c17cd001da580 



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71579/new/

https://reviews.llvm.org/D71579



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D71579: [driver][darwin] Pass -platform_version flag to the linker instead of the -_version_min flag

2019-12-17 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment.

Looks like `HOST_LINK_VERSION` is influencing the decision. I should specify 
the version manually in the tests then.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71579/new/

https://reviews.llvm.org/D71579



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D71579: [driver][darwin] Pass -platform_version flag to the linker instead of the -_version_min flag

2019-12-17 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment.

@phosek Thanks, I think it reproduces on our macOS bots. I'll start fixing it 
right now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71579/new/

https://reviews.llvm.org/D71579



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D71579: [driver][darwin] Pass -platform_version flag to the linker instead of the -_version_min flag

2019-12-17 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment.

I'm not sure if the detection is working correctly, this is failing on our 
macOS toolchain bots:

  FAIL: Clang :: Driver/darwin-ld-platform-version-ios.c (5284 of 16450)
   TEST 'Clang :: Driver/darwin-ld-platform-version-ios.c' 
FAILED 
  Script:
  --
  : 'RUN: at line 1';   touch 
/b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/tools/clang/test/Driver/Output/darwin-ld-platform-version-ios.c.tmp.o
  : 'RUN: at line 3';   
/b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/bin/clang -target 
arm64-apple-ios12.3 -isysroot 
/b/s/w/ir/k/llvm-project/clang/test/Driver/Inputs/iPhoneOS13.0.sdk -### 
/b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/tools/clang/test/Driver/Output/darwin-ld-platform-version-ios.c.tmp.o
 2>&1| /b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/bin/FileCheck 
/b/s/w/ir/k/llvm-project/clang/test/Driver/darwin-ld-platform-version-ios.c
  : 'RUN: at line 5';   
/b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/bin/clang -target 
x86_64-apple-ios13-simulator -isysroot 
/b/s/w/ir/k/llvm-project/clang/test/Driver/Inputs/iPhoneOS13.0.sdk -### 
/b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/tools/clang/test/Driver/Output/darwin-ld-platform-version-ios.c.tmp.o
 2>&1| /b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/bin/FileCheck 
--check-prefix=SIMUL 
/b/s/w/ir/k/llvm-project/clang/test/Driver/darwin-ld-platform-version-ios.c
  --
  Exit Code: 1
  
  Command Output (stderr):
  --
  
/b/s/w/ir/k/llvm-project/clang/test/Driver/darwin-ld-platform-version-ios.c:8:11:
 error: CHECK: expected string not found in input
  // CHECK: "-platform_version" "ios" "12.3.0" "13.0"
^
  :1:1: note: scanning from here
  Fuchsia clang version 10.0.0 
(https://fuchsia.googlesource.com/a/third_party/llvm-project 
1a8ff89653d2a80a013701fe927d2d32491bff59)
  ^
  :5:141: note: possible intended match here
   "/usr/bin/ld" "-demangle" "-lto_library" 
"/b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/lib/libLTO.dylib" 
"-dynamic" "-arch" "arm64" "-iphoneos_version_min" "12.3.0" "-syslibroot" 
"/b/s/w/ir/k/llvm-project/clang/test/Driver/Inputs/iPhoneOS13.0.sdk" "-o" 
"a.out" 
"/b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/tools/clang/test/Driver/Output/darwin-ld-platform-version-ios.c.tmp.o"
 "-lSystem" 
"/b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/lib/clang/10.0.0/lib/darwin/libclang_rt.ios.a"

  ^
  
  --
  
  
  Testing:  0.. 10.. 20.. 30
  FAIL: Clang :: Driver/darwin-ld-platform-version-macos.c (5286 of 16450)
   TEST 'Clang :: 
Driver/darwin-ld-platform-version-macos.c' FAILED 
  Script:
  --
  : 'RUN: at line 1';   touch 
/b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/tools/clang/test/Driver/Output/darwin-ld-platform-version-macos.c.tmp.o
  : 'RUN: at line 3';   
/b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/bin/clang -target 
x86_64-apple-macos10.13 -isysroot 
/b/s/w/ir/k/llvm-project/clang/test/Driver/Inputs/MacOSX10.14.sdk -### 
/b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/tools/clang/test/Driver/Output/darwin-ld-platform-version-macos.c.tmp.o
 2>&1| /b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/bin/FileCheck 
/b/s/w/ir/k/llvm-project/clang/test/Driver/darwin-ld-platform-version-macos.c
  : 'RUN: at line 5';   env 
SDKROOT=/b/s/w/ir/k/llvm-project/clang/test/Driver/Inputs/MacOSX10.14.sdk 
/b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/bin/clang -target 
x86_64-apple-macos10.13.0.1 -mlinker-version=520 -### 
/b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/tools/clang/test/Driver/Output/darwin-ld-platform-version-macos.c.tmp.o
 2>&1| /b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/bin/FileCheck 
/b/s/w/ir/k/llvm-project/clang/test/Driver/darwin-ld-platform-version-macos.c
  : 'RUN: at line 10';   
/b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/bin/clang -target 
x86_64-apple-macos10.13 -### 
/b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/tools/clang/test/Driver/Output/darwin-ld-platform-version-macos.c.tmp.o
 2>&1| /b/s/w/ir/k/recipe_cleanup/clangybBdXS/llvm_build_dir/bin/FileCheck 
--check-prefix=NOSDK 
/b/s/w/ir/k/llvm-project/clang/test/Driver/darwin-ld-platform-version-macos.c
  --
  Exit Code: 1
  
  Command Output (stderr):
  --
  
/b/s/w/ir/k/llvm-project/clang/test/Driver/darwin-ld-platform-version-macos.c:8:11:
 error: CHECK: expected string not found in input
  // CHECK: "-platform_version" "macos" "10.13.0" "10.14"
^
  :1:1: note: scanning from here
  Fuchsia clang version 10.0.0 
(https://fuchsia.googlesource.com/a/third_party/llvm-project 
1a8ff89653d2a80a013701fe927d2d32491bff59)
  ^
  :5:364: note: possible intended match here
   "/usr/bin/ld" "-demangle" "-lto_library" 

[PATCH] D71579: [driver][darwin] Pass -platform_version flag to the linker instead of the -_version_min flag

2019-12-17 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG25ce33a6e4f3: [driver][darwin] Pass -platform_version flag 
to the linker instead of theā€¦ (authored by arphaman).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71579/new/

https://reviews.llvm.org/D71579

Files:
  clang/lib/Driver/ToolChains/Darwin.cpp
  clang/lib/Driver/ToolChains/Darwin.h
  clang/test/Driver/Inputs/WatchOS6.0.sdk/SDKSettings.json
  clang/test/Driver/Inputs/iPhoneOS13.0.sdk/SDKSettings.json
  clang/test/Driver/darwin-infer-simulator-sdkroot.c
  clang/test/Driver/darwin-ld-platform-version-ios.c
  clang/test/Driver/darwin-ld-platform-version-macos.c
  clang/test/Driver/darwin-ld-platform-version-tvos.c
  clang/test/Driver/darwin-ld-platform-version-watchos.c
  clang/test/Driver/darwin-ld.c
  clang/test/Driver/darwin-sdkroot.c
  clang/test/Driver/target-triple-deployment.c
  llvm/include/llvm/Support/VersionTuple.h

Index: llvm/include/llvm/Support/VersionTuple.h
===
--- llvm/include/llvm/Support/VersionTuple.h
+++ llvm/include/llvm/Support/VersionTuple.h
@@ -87,6 +87,13 @@
 return Build;
   }
 
+  /// Return a version tuple that contains only the first 3 version components.
+  VersionTuple withoutBuild() const {
+if (HasBuild)
+  return VersionTuple(Major, Minor, Subminor);
+return *this;
+  }
+
   /// Determine if two version numbers are equivalent. If not
   /// provided, minor and subminor version numbers are considered to be zero.
   friend bool operator==(const VersionTuple , const VersionTuple ) {
Index: clang/test/Driver/target-triple-deployment.c
===
--- clang/test/Driver/target-triple-deployment.c
+++ clang/test/Driver/target-triple-deployment.c
@@ -1,14 +1,14 @@
 // RUN: touch %t.o
-// RUN: %clang -target x86_64-apple-macosx10.4 -### %t.o 2> %t.log
-// RUN: %clang -target x86_64-apple-darwin9 -### %t.o 2>> %t.log
-// RUN: %clang -target x86_64-apple-macosx10.7 -### %t.o 2>> %t.log
+// RUN: %clang -target x86_64-apple-macosx10.4 -mlinker-version=400 -### %t.o 2> %t.log
+// RUN: %clang -target x86_64-apple-darwin9 -mlinker-version=400 -### %t.o 2>> %t.log
+// RUN: %clang -target x86_64-apple-macosx10.7 -mlinker-version=400 -### %t.o 2>> %t.log
 //
-// RUN: %clang -target armv7-apple-ios -### %t.o 2>> %t.log
-// RUN: %clang -target armv7-apple-ios0.0 -### %t.o 2>> %t.log
-// RUN: %clang -target armv7-apple-ios1.2.3 -### %t.o 2>> %t.log
-// RUN: %clang -target armv7-apple-ios5.0 -### %t.o 2>> %t.log
-// RUN: %clang -target armv7-apple-ios7.0 -### %t.o 2>> %t.log
-// RUN: %clang -target arm64-apple-ios -### %t.o 2>> %t.log
+// RUN: %clang -target armv7-apple-ios -mlinker-version=400 -### %t.o 2>> %t.log
+// RUN: %clang -target armv7-apple-ios0.0 -mlinker-version=400 -### %t.o 2>> %t.log
+// RUN: %clang -target armv7-apple-ios1.2.3 -mlinker-version=400 -### %t.o 2>> %t.log
+// RUN: %clang -target armv7-apple-ios5.0 -mlinker-version=400 -### %t.o 2>> %t.log
+// RUN: %clang -target armv7-apple-ios7.0 -mlinker-version=400 -### %t.o 2>> %t.log
+// RUN: %clang -target arm64-apple-ios -mlinker-version=400 -### %t.o 2>> %t.log
 //
 // RUN: FileCheck %s < %t.log
 
Index: clang/test/Driver/darwin-sdkroot.c
===
--- clang/test/Driver/darwin-sdkroot.c
+++ clang/test/Driver/darwin-sdkroot.c
@@ -43,7 +43,7 @@
 //
 // RUN: rm -rf %t/SDKs/iPhoneOS8.0.0.sdk
 // RUN: mkdir -p %t/SDKs/iPhoneOS8.0.0.sdk
-// RUN: env SDKROOT=%t/SDKs/iPhoneOS8.0.0.sdk %clang -target arm64-apple-darwin --sysroot="" %s -### 2>&1 \
+// RUN: env SDKROOT=%t/SDKs/iPhoneOS8.0.0.sdk %clang -target arm64-apple-darwin -mlinker-version=400 --sysroot="" %s -### 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-IPHONE %s
 //
 // CHECK-IPHONE: clang
@@ -55,7 +55,7 @@
 //
 // RUN: rm -rf %t/SDKs/iPhoneSimulator8.0.sdk
 // RUN: mkdir -p %t/SDKs/iPhoneSimulator8.0.sdk
-// RUN: env SDKROOT=%t/SDKs/iPhoneSimulator8.0.sdk %clang -target x86_64-apple-darwin --sysroot="" %s -### 2>&1 \
+// RUN: env SDKROOT=%t/SDKs/iPhoneSimulator8.0.sdk %clang -target x86_64-apple-darwin -mlinker-version=400 --sysroot="" %s -### 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-SIMULATOR %s
 //
 // CHECK-SIMULATOR: clang
@@ -66,7 +66,7 @@
 //
 // RUN: rm -rf %t/SDKs/MacOSX10.10.0.sdk
 // RUN: mkdir -p %t/SDKs/MacOSX10.10.0.sdk
-// RUN: env SDKROOT=%t/SDKs/MacOSX10.10.0.sdk %clang -target x86_64-apple-darwin --sysroot="" %s -### 2>&1 \
+// RUN: env SDKROOT=%t/SDKs/MacOSX10.10.0.sdk %clang -target x86_64-apple-darwin -mlinker-version=400 --sysroot="" %s -### 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-MACOSX %s
 //
 // CHECK-MACOSX: clang
Index: clang/test/Driver/darwin-ld.c
===
--- clang/test/Driver/darwin-ld.c
+++ clang/test/Driver/darwin-ld.c
@@ 

[PATCH] D71579: [driver][darwin] Pass -platform_version flag to the linker instead of the -_version_min flag

2019-12-16 Thread Steven Wu via Phabricator via cfe-commits
steven_wu accepted this revision.
steven_wu added a comment.
This revision is now accepted and ready to land.

SGTM.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71579/new/

https://reviews.llvm.org/D71579



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D71579: [driver][darwin] Pass -platform_version flag to the linker instead of the -_version_min flag

2019-12-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked an inline comment as done.
arphaman added inline comments.



Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:2530
+  return "ios";
+// FIXME: Add macCatalyst support here ("\"mac catalyst\"").
+llvm_unreachable("macCatalyst isn't yet supported");

steven_wu wrote:
> arphaman wrote:
> > steven_wu wrote:
> > > Why not support that in this commit? I don't see problem returning a 
> > > string with space inside.
> > The rest of macCatalyst support is not yet upstreamed (specifically the new 
> > `Environment` value)
> Doesn't this mean you hit llvm_unreachable when you link catalyst? And this 
> is the default behavior?
You can't link for macCatalyst with the current `master` Clang. I will modify 
the downstream Clang to pass in the right flag though.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71579/new/

https://reviews.llvm.org/D71579



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D71579: [driver][darwin] Pass -platform_version flag to the linker instead of the -_version_min flag

2019-12-16 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added inline comments.



Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:2530
+  return "ios";
+// FIXME: Add macCatalyst support here ("\"mac catalyst\"").
+llvm_unreachable("macCatalyst isn't yet supported");

arphaman wrote:
> steven_wu wrote:
> > Why not support that in this commit? I don't see problem returning a string 
> > with space inside.
> The rest of macCatalyst support is not yet upstreamed (specifically the new 
> `Environment` value)
Doesn't this mean you hit llvm_unreachable when you link catalyst? And this is 
the default behavior?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71579/new/

https://reviews.llvm.org/D71579



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D71579: [driver][darwin] Pass -platform_version flag to the linker instead of the -_version_min flag

2019-12-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked 2 inline comments as done.
arphaman added inline comments.



Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:339
   // Add the deployment target.
-  MachOTC.addMinVersionArgs(Args, CmdArgs);
+  if (!Version[0] || Version[0] >= 520)
+MachOTC.addPlatformVersionArgs(Args, CmdArgs);

steven_wu wrote:
> Why version '0' should go through the new path?
Version `0` indicates that `-mlinker-version=` wasn't specified. We want to use 
the new flag by default.



Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:2530
+  return "ios";
+// FIXME: Add macCatalyst support here ("\"mac catalyst\"").
+llvm_unreachable("macCatalyst isn't yet supported");

steven_wu wrote:
> Why not support that in this commit? I don't see problem returning a string 
> with space inside.
The rest of macCatalyst support is not yet upstreamed (specifically the new 
`Environment` value)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71579/new/

https://reviews.llvm.org/D71579



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D71579: [driver][darwin] Pass -platform_version flag to the linker instead of the -_version_min flag

2019-12-16 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added inline comments.



Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:339
   // Add the deployment target.
-  MachOTC.addMinVersionArgs(Args, CmdArgs);
+  if (!Version[0] || Version[0] >= 520)
+MachOTC.addPlatformVersionArgs(Args, CmdArgs);

Why version '0' should go through the new path?



Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:2530
+  return "ios";
+// FIXME: Add macCatalyst support here ("\"mac catalyst\"").
+llvm_unreachable("macCatalyst isn't yet supported");

Why not support that in this commit? I don't see problem returning a string 
with space inside.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71579/new/

https://reviews.llvm.org/D71579



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D71579: [driver][darwin] Pass -platform_version flag to the linker instead of the -_version_min flag

2019-12-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision.
arphaman added reviewers: steven_wu, dexonsmith.
Herald added subscribers: llvm-commits, ributzka, jkorous.
Herald added projects: clang, LLVM.

In Xcode 11, ld added a new flag called `-platform_version` that can be used 
instead of the old `-_version_min` flags. The new flag allows Clang 
to pass the SDK version from the driver to the linker.
This patch adopts the new `-platform_version` flag in Clang, and starts using 
it by default, unless a linker version < 520 is passed to the driver.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71579

Files:
  clang/lib/Driver/ToolChains/Darwin.cpp
  clang/lib/Driver/ToolChains/Darwin.h
  clang/test/Driver/Inputs/WatchOS6.0.sdk/SDKSettings.json
  clang/test/Driver/Inputs/iPhoneOS13.0.sdk/SDKSettings.json
  clang/test/Driver/darwin-infer-simulator-sdkroot.c
  clang/test/Driver/darwin-ld-platform-version-ios.c
  clang/test/Driver/darwin-ld-platform-version-macos.c
  clang/test/Driver/darwin-ld-platform-version-tvos.c
  clang/test/Driver/darwin-ld-platform-version-watchos.c
  clang/test/Driver/darwin-ld.c
  clang/test/Driver/darwin-sdkroot.c
  clang/test/Driver/target-triple-deployment.c
  llvm/include/llvm/Support/VersionTuple.h

Index: llvm/include/llvm/Support/VersionTuple.h
===
--- llvm/include/llvm/Support/VersionTuple.h
+++ llvm/include/llvm/Support/VersionTuple.h
@@ -87,6 +87,13 @@
 return Build;
   }
 
+  /// Return a version tuple that contains only the first 3 version components.
+  VersionTuple withoutBuild() const {
+if (HasBuild)
+  return VersionTuple(Major, Minor, Subminor);
+return *this;
+  }
+
   /// Determine if two version numbers are equivalent. If not
   /// provided, minor and subminor version numbers are considered to be zero.
   friend bool operator==(const VersionTuple , const VersionTuple ) {
Index: clang/test/Driver/target-triple-deployment.c
===
--- clang/test/Driver/target-triple-deployment.c
+++ clang/test/Driver/target-triple-deployment.c
@@ -1,14 +1,14 @@
 // RUN: touch %t.o
-// RUN: %clang -target x86_64-apple-macosx10.4 -### %t.o 2> %t.log
-// RUN: %clang -target x86_64-apple-darwin9 -### %t.o 2>> %t.log
-// RUN: %clang -target x86_64-apple-macosx10.7 -### %t.o 2>> %t.log
+// RUN: %clang -target x86_64-apple-macosx10.4 -mlinker-version=400 -### %t.o 2> %t.log
+// RUN: %clang -target x86_64-apple-darwin9 -mlinker-version=400 -### %t.o 2>> %t.log
+// RUN: %clang -target x86_64-apple-macosx10.7 -mlinker-version=400 -### %t.o 2>> %t.log
 //
-// RUN: %clang -target armv7-apple-ios -### %t.o 2>> %t.log
-// RUN: %clang -target armv7-apple-ios0.0 -### %t.o 2>> %t.log
-// RUN: %clang -target armv7-apple-ios1.2.3 -### %t.o 2>> %t.log
-// RUN: %clang -target armv7-apple-ios5.0 -### %t.o 2>> %t.log
-// RUN: %clang -target armv7-apple-ios7.0 -### %t.o 2>> %t.log
-// RUN: %clang -target arm64-apple-ios -### %t.o 2>> %t.log
+// RUN: %clang -target armv7-apple-ios -mlinker-version=400 -### %t.o 2>> %t.log
+// RUN: %clang -target armv7-apple-ios0.0 -mlinker-version=400 -### %t.o 2>> %t.log
+// RUN: %clang -target armv7-apple-ios1.2.3 -mlinker-version=400 -### %t.o 2>> %t.log
+// RUN: %clang -target armv7-apple-ios5.0 -mlinker-version=400 -### %t.o 2>> %t.log
+// RUN: %clang -target armv7-apple-ios7.0 -mlinker-version=400 -### %t.o 2>> %t.log
+// RUN: %clang -target arm64-apple-ios -mlinker-version=400 -### %t.o 2>> %t.log
 //
 // RUN: FileCheck %s < %t.log
 
Index: clang/test/Driver/darwin-sdkroot.c
===
--- clang/test/Driver/darwin-sdkroot.c
+++ clang/test/Driver/darwin-sdkroot.c
@@ -43,7 +43,7 @@
 //
 // RUN: rm -rf %t/SDKs/iPhoneOS8.0.0.sdk
 // RUN: mkdir -p %t/SDKs/iPhoneOS8.0.0.sdk
-// RUN: env SDKROOT=%t/SDKs/iPhoneOS8.0.0.sdk %clang -target arm64-apple-darwin --sysroot="" %s -### 2>&1 \
+// RUN: env SDKROOT=%t/SDKs/iPhoneOS8.0.0.sdk %clang -target arm64-apple-darwin -mlinker-version=400 --sysroot="" %s -### 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-IPHONE %s
 //
 // CHECK-IPHONE: clang
@@ -55,7 +55,7 @@
 //
 // RUN: rm -rf %t/SDKs/iPhoneSimulator8.0.sdk
 // RUN: mkdir -p %t/SDKs/iPhoneSimulator8.0.sdk
-// RUN: env SDKROOT=%t/SDKs/iPhoneSimulator8.0.sdk %clang -target x86_64-apple-darwin --sysroot="" %s -### 2>&1 \
+// RUN: env SDKROOT=%t/SDKs/iPhoneSimulator8.0.sdk %clang -target x86_64-apple-darwin -mlinker-version=400 --sysroot="" %s -### 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-SIMULATOR %s
 //
 // CHECK-SIMULATOR: clang
@@ -66,7 +66,7 @@
 //
 // RUN: rm -rf %t/SDKs/MacOSX10.10.0.sdk
 // RUN: mkdir -p %t/SDKs/MacOSX10.10.0.sdk
-// RUN: env SDKROOT=%t/SDKs/MacOSX10.10.0.sdk %clang -target x86_64-apple-darwin --sysroot="" %s -### 2>&1 \
+// RUN: env SDKROOT=%t/SDKs/MacOSX10.10.0.sdk %clang -target x86_64-apple-darwin -mlinker-version=400 --sysroot="" %s -### 2>&1 \