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

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