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

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