From b2e698ae8a56ef12d69f76415d712b3247ea88c4 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 26 May 2026 00:57:08 +0800 Subject: improve pch for std modules --- xmake/modules/core/tools/gcc.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xmake/modules') diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 3bd9aefef..9172dd2ed 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -974,7 +974,8 @@ function compargv(self, sourcefile, objectfile, flags, opt) local extension = path.extension(sourcefile) if toolchain_utils.is_cxx_headerext(extension) then flags = _translate_flags_for_pch(self, flags) - elseif support.has_module_extension(sourcefile, {extension = extension}) then + elseif support.has_module_extension(sourcefile, {extension = extension}) + or support.is_stdmodule_file(opt.target, sourcefile) then flags = _translate_flags_for_mpp(self, flags) end -- cgit v1.3.1