Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions scripts/smoke-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,23 @@ else
warn "Neither 'timeout' nor 'gtimeout' found; running without timeout protection"
fi

# On Linux, add ingot lib directories to LD_LIBRARY_PATH so the test
# binary can find libraries shipped with the toolchain (e.g., libstdc++.so
# built by GCC). Without this, the binary may link against the container's
# older libstdc++ and fail with GLIBCXX version errors.
# NOTE: Not set on macOS — DYLD_LIBRARY_PATH conflicts with system
# frameworks and causes crashes. macOS toolchains use @rpath instead.
if [[ "$(uname -s)" == "Linux" ]]; then
INGOT_LIB="${INGOT_ROOT}/lib"
INGOT_LIB64="${INGOT_ROOT}/lib64"
SMOKE_LD_PATH=""
[[ -d "$INGOT_LIB" ]] && SMOKE_LD_PATH="${INGOT_LIB}"
[[ -d "$INGOT_LIB64" ]] && SMOKE_LD_PATH="${SMOKE_LD_PATH:+${SMOKE_LD_PATH}:}${INGOT_LIB64}"
if [[ -n "$SMOKE_LD_PATH" ]]; then
export LD_LIBRARY_PATH="${SMOKE_LD_PATH}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
fi
fi

set +e
if [[ -n "$TIMEOUT_CMD" ]]; then
$TIMEOUT_CMD "$TIMEOUT" "${WORK_DIR}/hello" > "${WORK_DIR}/actual" 2>&1
Expand Down
Loading