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

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