summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-05-28 22:06:58 +0800
committerruki <[email protected]>2022-05-28 22:10:35 +0800
commit0db757b6c79d41db3c2e3296f97dac016a4f41cc (patch)
treef19e9fc3e10492b1f802e0bb3245ea69a8d41cf9
parent6b2c7feddae06f86b4b28791e2c84c59f2a6423d (diff)
disable modules for cache
-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"?