From 2d9d968fea196dd8dc107922787b6ce987d90398 Mon Sep 17 00:00:00 2001 From: yizhinailong Date: Fri, 22 May 2026 22:33:59 +0800 Subject: [PATCH] fix: update Linux runtime library path handling - Update comment to clarify that runtime_lib_dirs() provides Linux toolchain runtime library search paths instead of generic Linux-specific paths - Remove hardcoded system library paths (/lib/x86_64-linux-gnu, /usr/lib/x86_64-linux-gnu, /usr/lib64) from runtime_lib_dirs() function to rely solely on toolchain-specific paths --- src/platform/linux.cppm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/platform/linux.cppm b/src/platform/linux.cppm index f132a76..5dfd05c 100644 --- a/src/platform/linux.cppm +++ b/src/platform/linux.cppm @@ -2,7 +2,7 @@ // // Provides: // build_ld_library_path() — construct LD_LIBRARY_PATH prefix -// runtime_lib_dirs() — Linux-specific library search paths +// runtime_lib_dirs() — Linux toolchain runtime library search paths module; @@ -19,7 +19,7 @@ export namespace mcpp::platform::linux_ { std::string build_ld_library_path_prefix( const std::vector& dirs); -// Return Linux-specific runtime library directories for LLVM toolchains. +// Return Linux toolchain runtime library directories. std::vector runtime_lib_dirs(const std::filesystem::path& toolchain_root); @@ -56,9 +56,6 @@ runtime_lib_dirs(const std::filesystem::path& toolchain_root) { dirs.push_back(p); }; add(toolchain_root / "lib" / "x86_64-unknown-linux-gnu"); - add("/lib/x86_64-linux-gnu"); - add("/usr/lib/x86_64-linux-gnu"); - add("/usr/lib64"); #else (void)toolchain_root; #endif