Blame SOURCES/runtime-arm64-lld-fix.patch

31d075
diff --git a/eng/native/init-compiler.sh b/eng/native/init-compiler.sh
31d075
index 567d18da474..927b3071e92 100755
31d075
--- a/eng/native/init-compiler.sh
31d075
+++ b/eng/native/init-compiler.sh
31d075
@@ -108,11 +108,8 @@
31d075
 fi
31d075
 
31d075
 if [[ "$compiler" == "clang" ]]; then
31d075
-    if command -v "lld$desired_version" > /dev/null; then
31d075
-        # Only lld version >= 9 can be considered stable
31d075
-        if [[ "$majorVersion" -ge 9 ]]; then
31d075
-            LDFLAGS="-fuse-ld=lld"
31d075
-        fi
31d075
+    if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then
31d075
+        LDFLAGS="-fuse-ld=lld"
31d075
     fi
31d075
 fi
31d075