[PATCH] D74784: [driver][darwin] Don't use -platform_version flag by default

dmajor via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 18 12:08:28 PST 2020


dmajor created this revision.
dmajor added reviewers: arphaman, steven_wu, dexonsmith.
dmajor added projects: clang, LLVM.
Herald added a subscriber: cfe-commits.

(Note, I don't currently have commit access.)

The code in llvmorg-10-init-12188-g25ce33a6e4f is a breaking change for users of older linkers who don't pass a version parameter, which prevents a drop-in clang upgrade. Old tools can't know about what future tools will do, so as a general principle the burden should be new tools to be compatible by default. Also, for comparison, none of the other tests of `Version` within `AddLinkArgs` add any new behaviors unless the version is explicitly specified. Therefore, this patch changes the `-platform_version` behavior from opt-out to opt-in.

In light of the test fixup in llvmorg-10-init-12213-gbe88a20c900, I've used `-mlinker-version=0` instead of doing a straight revert of the additions of `-mlinker-version=400`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74784

Files:
  clang/lib/Driver/ToolChains/Darwin.cpp
  clang/test/Driver/darwin-infer-simulator-sdkroot.c
  clang/test/Driver/darwin-ld-platform-version-macos.c
  clang/test/Driver/darwin-ld.c
  clang/test/Driver/darwin-sdkroot.c
  clang/test/Driver/target-triple-deployment.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74784.245226.patch
Type: text/x-patch
Size: 16902 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200218/6c276f84/attachment-0001.bin>


More information about the cfe-commits mailing list