summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/core/tools/gcc.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index b4ea28ba2..dc517a60f 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -400,6 +400,11 @@ function _preprocess(program, argv, opt)
-- get preprocessor flags
table.insert(cppflags, flag)
+ -- for c++ modules, we cannot support it now
+ if flag:startswith("-fmodules") then
+ return
+ end
+
-- get compiler flags
if flag == "-MMD" or (flag:startswith("-I") and #flag > 2) or flag:startswith("--sysroot=") then
skipped = 1
@@ -422,7 +427,7 @@ function _preprocess(program, argv, opt)
-- is precompiled header?
if objectfile:endswith(".gch") or objectfile:endswith(".pch") then
- return false
+ return
end
-- enable "-fdirectives-only"?