diff options
| author | ruki <[email protected]> | 2025-10-22 17:18:21 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-10-22 17:18:21 +0800 |
| commit | 6b27644dd38664a1a2253faec53c88f0ea9fcf06 (patch) | |
| tree | 5f710a7545f82371672d7a769b0514668d67c393 | |
| parent | 61718bca7649cee105acbbf33afcddfc80015f67 (diff) | |
| parent | ed3784b19030e6d0320f7afa139df8fd16e409d3 (diff) | |
Merge pull request #6956 from Redbeanw44602/fix/zigcc
Fix build failure caused by zigcc linker not supporting depfile.
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 927f3daf8..73976bd78 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -392,6 +392,14 @@ function _fix_cxx_compiler_cmake(package, envs) end end +-- @see https://github.com/ziglang/zig/issues/22213 +function _fix_zigcc_linker_cmake(package, envs) + if package:has_tool("cc", "zig_cc") then + envs.CMAKE_C_LINKER_DEPFILE_SUPPORTED = "FALSE" + envs.CMAKE_CXX_LINKER_DEPFILE_SUPPORTED = "FALSE" + end +end + -- insert configs from envs function _insert_configs_from_envs(configs, envs, opt) opt = opt or {} @@ -418,6 +426,7 @@ function _get_configs_for_generic(package, configs, opt) if package:is_library() then envs.BUILD_SHARED_LIBS = package:config("shared") and "ON" or "OFF" end + _fix_zigcc_linker_cmake(package, envs) _insert_configs_from_envs(configs, envs, opt) end |
