From 7c0fcf37dae8da15fe47f5ae8c35bcfa07570e0a Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 24 Jan 2024 00:46:05 +0800 Subject: improve conan runtimes again --- xmake/modules/package/manager/conan/v2/install_package.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/xmake/modules/package/manager/conan/v2/install_package.lua b/xmake/modules/package/manager/conan/v2/install_package.lua index 111b355d7..5d2bdd384 100644 --- a/xmake/modules/package/manager/conan/v2/install_package.lua +++ b/xmake/modules/package/manager/conan/v2/install_package.lua @@ -226,14 +226,15 @@ function _conan_generate_compiler_profile(profile, configs, opt) else local program, toolname = platform.tool("cc", plat, arch) if toolname == "gcc" or toolname == "clang" then - runtimes = table.wrap(runtimes) profile:print("compiler=" .. toolname) profile:print("compiler.cppstd=gnu17") - if table.contains(runtimes, "c++_static", "c++_shared") then - profile:print("compiler.libcxx=libc++") - else - profile:print("compiler.libcxx=libstdc++11") + local libcxx = "libstdc++11" + if runtimes and table.contains(table.wrap(runtimes), "c++_static", "c++_shared") then + libcxx = "libc++" + elseif not runtimes and toolname == "clang" then + libcxx = "libc++" end + profile:print("compiler.libcxx=" .. libcxx) local version = _conan_get_compiler_version(toolname, program) if version then profile:print("compiler.version=" .. version) -- cgit v1.3.1