From 4091f73c12482b387e6c06c3147f05c12b9503f6 Mon Sep 17 00:00:00 2001 From: klzgrad Date: Sat, 5 Apr 2025 19:25:21 +0800 Subject: [PATCH] loong64: build: Fix libc link flags --- src/build/config/BUILD.gn | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/build/config/BUILD.gn b/src/build/config/BUILD.gn index d32152894f..c66f4ff715 100644 --- a/src/build/config/BUILD.gn +++ b/src/build/config/BUILD.gn @@ -216,11 +216,14 @@ config("default_libs") { # linking can have run-time side effects, nothing should be listed here. libs = [] } else if (is_linux || is_chromeos) { - libs = [ - "dl", - "pthread", - "rt", - ] + # loong64 uses newer libc that subsumes libdl.so etc. + if (current_cpu != "loong64") { + libs = [ + "dl", + "pthread", + "rt", + ] + } } }