diff options
| author | Arthur LAURENT <[email protected]> | 2025-05-11 18:14:15 +0200 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2025-05-11 18:58:21 +0200 |
| commit | e7ca027a1ebc0ad0e02160cd0c6b3cd502efadc8 (patch) | |
| tree | 9d1048e102be9f29f64d0f2571204037da9ac73e | |
| parent | 7be20413ac8cdd099055ae4eef80647ead092838 (diff) | |
(C++ modules support) fix warnings for std module
| -rw-r--r-- | xmake/rules/c++/modules/clang/support.lua | 6 | ||||
| -rw-r--r-- | xmake/rules/c++/modules/gcc/support.lua | 7 | ||||
| -rw-r--r-- | xmake/rules/c++/modules/msvc/support.lua | 4 |
3 files changed, 6 insertions, 11 deletions
diff --git a/xmake/rules/c++/modules/clang/support.lua b/xmake/rules/c++/modules/clang/support.lua index e351bc615..3eb591056 100644 --- a/xmake/rules/c++/modules/clang/support.lua +++ b/xmake/rules/c++/modules/clang/support.lua @@ -258,7 +258,7 @@ end function get_stdmodules(target) - if target:policy("build.c++.modules.std") then + if not target:policy("build.c++.modules.std") then return end local cpplib = _get_cpplibrary_name(target) @@ -282,14 +282,14 @@ function get_stdmodules(target) -- dont be greedy and don't enable stdc++ std module support for llvm < 19 local clang_version = get_clang_version(target) if clang_version and semver.compare(clang_version, "19.0") >= 0 then - return import(".gcc.support").get_stdmodules(target, {dont_warn = true}) + return import(".gcc.support").get_stdmodules(target) end elseif cpplib == "msstl" then -- msstl std module file is not compatible with llvm < 19 local clang_version = get_clang_version(target) if clang_version and semver.compare(clang_version, "19.0") >= 0 then local toolchain = target:toolchain("llvm") or target:toolchain("clang") or target:toolchain("clang-cl") - return import(".msvc.support").get_stdmodules(target, {dont_warn = false, toolchain = toolchain}) + return import(".msvc.support").get_stdmodules(target, {toolchain = toolchain}) end end end diff --git a/xmake/rules/c++/modules/gcc/support.lua b/xmake/rules/c++/modules/gcc/support.lua index e28ff2046..d8ab791eb 100644 --- a/xmake/rules/c++/modules/gcc/support.lua +++ b/xmake/rules/c++/modules/gcc/support.lua @@ -166,8 +166,7 @@ function _get_std_module_manifest_path(target) end end -function get_stdmodules(target, opt) - opt = opt or {} +function get_stdmodules(target) if not target:policy("build.c++.modules.std") then return end @@ -187,9 +186,7 @@ function get_stdmodules(target, opt) return std_module_files end end - if not opt.dont_warn then - wprint("std and std.compat modules not found! maybe try to add --sdk=<PATH/TO/LLVM> or install libc++") - end + wprint("std and std.compat modules not found! maybe try to add --sdk=<PATH/TO/LLVM> or install libc++") end function get_bmi_extension() diff --git a/xmake/rules/c++/modules/msvc/support.lua b/xmake/rules/c++/modules/msvc/support.lua index b6458b383..4cb4a7fad 100644 --- a/xmake/rules/c++/modules/msvc/support.lua +++ b/xmake/rules/c++/modules/msvc/support.lua @@ -136,9 +136,7 @@ function get_stdmodules(target, opt) end end end - if not opt.dont_warn then - wprint("std and std.compat modules not found! disabling them for the build") - end + wprint("std and std.compat modules not found! disabling them for the build") end function get_bmi_extension() |
