diff options
| author | Chan Lee <[email protected]> | 2025-06-12 20:29:15 +0800 |
|---|---|---|
| committer | Chan Lee <[email protected]> | 2025-06-12 20:29:15 +0800 |
| commit | c5797c66fb75f672165b808893a52ccc5f73b650 (patch) | |
| tree | 31df87da3665aa10bbc2ea7355f6ca2be82dae5b | |
| parent | 773407f7df280a5fc50d2aa6419875297e711bb2 (diff) | |
rule(c++.modules): fix `get_gcc_version` for MinGW GCC 15 when toolname is 'gxx'
| -rw-r--r-- | xmake/rules/c++/modules/gcc/support.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/rules/c++/modules/gcc/support.lua b/xmake/rules/c++/modules/gcc/support.lua index dd7986475..23b2217e8 100644 --- a/xmake/rules/c++/modules/gcc/support.lua +++ b/xmake/rules/c++/modules/gcc/support.lua @@ -64,7 +64,7 @@ function load(target) if cxx11abi == nil then -- enable cxx11abi on GCC >= 15 as it is required for C++23 module local gcc_version = get_gcc_version(target) - if gcc_version and semver.compare(gcc_version, "15") > 0 then + if gcc_version and semver.compare(gcc_version, "15") >= 0 then cxx11abi = true end end @@ -323,7 +323,7 @@ function get_gcc_version(target) local gcc_version = _g.gcc_version if not gcc_version then local program, toolname = target:tool("cxx") - if program and toolname:startswith("gcc") then + if program and (toolname:startswith("gcc") or toolname:startswith("gxx")) then local gcc = find_tool(toolname, {program = program, version = true, envs = os.getenvs(), cachekey = "modules_support_gcc_" .. toolname}) if gcc then |
