Skip to content

Commit

Permalink
Don't output stdout from lld check in init-compiler.sh (#8221)
Browse files Browse the repository at this point in the history
  • Loading branch information
akoeplinger authored Nov 26, 2021
1 parent a7a5cc2 commit 6b74f9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eng/common/native/init-compiler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# This file detects the C/C++ compiler and exports it to the CC/CXX environment variables
#
# NOTE: some scripts source this file and rely on stdout being empty, make sure to not output anything here!

if [[ "$#" -lt 3 ]]; then
echo "Usage..."
Expand Down Expand Up @@ -113,7 +114,7 @@ fi

# Only lld version >= 9 can be considered stable
if [[ "$compiler" == "clang" && "$majorVersion" -ge 9 ]]; then
if "$CC" -fuse-ld=lld -Wl,--version 2>/dev/null; then
if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then
LDFLAGS="-fuse-ld=lld"
fi
fi
Expand Down

0 comments on commit 6b74f9e

Please sign in to comment.