summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SafeStackColoring.cpp
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2016-07-25 23:46:08 +0000
committerChris Bieneman <beanz@apple.com>2016-07-25 23:46:08 +0000
commitf4a56a7d209bd208948623a3b0418ff8a4548e87 (patch)
treefc7a04c3ae077ca814c7a00d9fde0fccdb22e10d /llvm/lib/CodeGen/SafeStackColoring.cpp
parentd2a10e88f67f6e81e4312a713eab74ec0a9328b7 (diff)
downloadbcm5719-llvm-f4a56a7d209bd208948623a3b0418ff8a4548e87.tar.gz
bcm5719-llvm-f4a56a7d209bd208948623a3b0418ff8a4548e87.zip
[CMake] Support feeding DYLD_LIBRARY_PATH into archiver calls
OS X 10.11 has a feature named System Integrity Protection. The goal of the feature is to make system binaries immutable (even as root). One part of this is that protected binaries do not receive DYLD_* environment variables because the kernel scrubs them before process launch. This causes problems for LTO bootstrap builds on Darwin that try to use the just-built libLTO with the host ar, ranlib, or libtool. This patch addresses two problems. (1) The tools themselves aren't protected binaries but the shim tools installed at / are, so we need to call xcrun -find to find libtool instead of using the one CMake finds. (2) Some build tools (ninja and make) use /bin/sh to invoke their subprocesses. Since /bin/sh is a system binary, the kernel scrubs the DYLD envars from their environment. To work around this we need to set the environment variables as part of the archiver commands, so the envars are set by the shell process instead of on the shell process. llvm-svn: 276710
Diffstat (limited to 'llvm/lib/CodeGen/SafeStackColoring.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud