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

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