diff options
| author | Arthur LAURENT <[email protected]> | 2025-04-24 16:35:23 +0200 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2025-04-24 16:35:23 +0200 |
| commit | 58854bf7b3018a7d52dbaea096cdd4d2307dc27d (patch) | |
| tree | 66dcda01a8a8648e82877a1b1da2a32530e81841 /xmake/rules/c++/modules/builder.lua | |
| parent | 175b91c0dbd964499e1049db5c70991deb87123c (diff) | |
(C++ modules support) factorize implementation getter
Diffstat (limited to 'xmake/rules/c++/modules/builder.lua')
| -rw-r--r-- | xmake/rules/c++/modules/builder.lua | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/xmake/rules/c++/modules/builder.lua b/xmake/rules/c++/modules/builder.lua index 51de339f7..34b603abd 100644 --- a/xmake/rules/c++/modules/builder.lua +++ b/xmake/rules/c++/modules/builder.lua @@ -235,22 +235,7 @@ function _is_duplicated_headerunit(target, key) end function _builder(target) - local cachekey = tostring(target) - local builder = support.memcache():get2("builder", cachekey) - if builder == nil then - if target:has_tool("cxx", "clang", "clangxx", "clang_cl") then - builder = import("clang.builder", {anonymous = true}) - elseif target:has_tool("cxx", "gcc", "gxx") then - builder = import("gcc.builder", {anonymous = true}) - elseif target:has_tool("cxx", "cl") then - builder = import("msvc.builder", {anonymous = true}) - else - local _, toolname = target:tool("cxx") - raise("compiler(%s): does not support c++ module!", toolname) - end - support.memcache():set2("builder", cachekey, builder) - end - return builder + return support.import_implementation_of(target, "builder") end function mark_build(target, name) |
