mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 23:24:24 +00:00
macos: symlink rustc dev libs to /usr/local/lib
Due to System Integrity Protection (SIP), exporting LD_LIBRARY_PATH will not work on macOS systems. Therefore, rather than disable SIP, we could symlink those rust dev libs to /usr/local/bin. I already tried install_name_tool(1) but couldn't make clippy-driver work on CI for whatever reasons.
This commit is contained in:
parent
b869eeb2a4
commit
abafec5640
1 changed files with 10 additions and 5 deletions
15
.travis.yml
15
.travis.yml
|
@ -110,11 +110,16 @@ before_script:
|
|||
rm rust-toolchain
|
||||
./setup-toolchain.sh
|
||||
- |
|
||||
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
|
||||
export PATH=$PATH:$(rustc --print sysroot)/bin
|
||||
else
|
||||
export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib
|
||||
fi
|
||||
SYSROOT=$(rustc --print sysroot)
|
||||
case "$TRAVIS_OS_NAME" in
|
||||
windows ) export PATH="${SYSROOT}/bin:${PATH}" ;;
|
||||
linux ) export LD_LIBRARY_PATH="${SYSROOT}/lib" ;;
|
||||
osx )
|
||||
# See <https://github.com/nteract/nteract/issues/1523#issuecomment-301623519>
|
||||
sudo mkdir -p /usr/local/lib
|
||||
sudo find "$SYSROOT/lib" -maxdepth 1 -name '*.dylib' -exec ln -s {} /usr/local/lib \;
|
||||
;;
|
||||
esac
|
||||
|
||||
script:
|
||||
- |
|
||||
|
|
Loading…
Reference in a new issue