From a12456a3e784236b46ff794c60588016061116b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Poulhi=C3=A8s?= Date: Sun, 30 May 2021 18:52:58 +0200 Subject: [PATCH] Use LIBRARY_PATH to have ld look for libgccjit at link time LD_LIBRARY_PATH is used at runtime whereas LIBRARY_PATH is used during linking. Without it, I get: = note: /usr/bin/ld: cannot find -lgccjit collect2: error: ld returned 1 exit status during the `cargo rustc` in `test.sh` --- test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test.sh b/test.sh index 6ffd5acac7f..e0b1ca19872 100755 --- a/test.sh +++ b/test.sh @@ -6,6 +6,8 @@ set -e export GCC_PATH=$(cat gcc_path) export LD_LIBRARY_PATH="$GCC_PATH" +export LIBRARY_PATH="$GCC_PATH" + if [[ "$1" == "--release" ]]; then export CHANNEL='release' CARGO_INCREMENTAL=1 cargo rustc --release