]> granicus.if.org Git - clang/commit
Support LIBRARY_PATH on all Darwin targets.
authorBob Wilson <bob.wilson@apple.com>
Tue, 29 Jul 2014 20:17:52 +0000 (20:17 +0000)
committerBob Wilson <bob.wilson@apple.com>
Tue, 29 Jul 2014 20:17:52 +0000 (20:17 +0000)
commit68c679f8416d6261836f6fd50e02a65ded40b157
tree444380260eabf87f98510530fcf9b92527c3777d
parent90a7f5e0041e5e37150b6bb048a4e9a606eeec2e
Support LIBRARY_PATH on all Darwin targets.

r197490 changed the behavior of LIBRARY_PATH to try to match GCC's behavior
for cross compilers and make clang work better on "bare metal" targets.
Unfortunately that change is breaking a number of MacPorts projects because
the LIBRARY_PATH environment variable is being ignored when compiling on a
64-bit host for a 32-bit target. Because the host and target architectures
differ, isCrossCompiling returns true. This does not make sense for Darwin,
where multiple architectures are supported natively via "fat" Mach-O slices
and where development is generally done against SDKs regardless. This patch
fixes the problem by overriding isCrossCompiling to return false for Darwin
toolchains.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214208 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/ToolChain.h
lib/Driver/ToolChains.h
test/Driver/linker-opts.c