[driver][macOS] Link libarclite from the default toolchain when clang
authorAlex Lorenz <arphaman@gmail.com>
Fri, 26 Apr 2019 22:40:47 +0000 (22:40 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Fri, 26 Apr 2019 22:40:47 +0000 (22:40 +0000)
commit3bf116c1a4f88d6e3f3fd0887453dea3569e0823
tree5f1bfaabbd00b17c0cf9499cbf08291a9ab12fb5
parent8504b5f64f47d54c83f66670e804dc70c6112dae
[driver][macOS] Link libarclite from the default toolchain when clang
is running in a toolchain outside of xcode

'libarclite' usually lives in the same toolchain as 'clang'. However, the
Swift open source toolchains for macOS distribute Clang without 'libarclite'.
In that case, to allow the linker to find 'libarclite', we point to the
'libarclite' that should be in the XcodeDefault toolchain instead. The
path to the toolchain is inferred from the SDK path if it's specified.

https://bugs.swift.org/browse/SR-9972
rdar://49947573

llvm-svn: 359353
clang/lib/Driver/ToolChains/Darwin.cpp
clang/test/Driver/arclite-link-external-toolchain.c [new file with mode: 0644]