summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/gcc/support.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/rules/c++/modules/gcc/support.lua')
-rw-r--r--xmake/rules/c++/modules/gcc/support.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/rules/c++/modules/gcc/support.lua b/xmake/rules/c++/modules/gcc/support.lua
index 264195874..52d8af79f 100644
--- a/xmake/rules/c++/modules/gcc/support.lua
+++ b/xmake/rules/c++/modules/gcc/support.lua
@@ -208,8 +208,11 @@ end
function get_moduleheaderflag(target)
local moduleheaderflag = _g.moduleheaderflag
if moduleheaderflag == nil then
+ -- we need to suppress warnings/errors:
+ -- external linkage definition of 'int main(int, char**)' in header module must be declared 'inline'
+ local snippet = ""
local compinst = target:compiler("cxx")
- if compinst:has_flags("-fmodule-header", "cxxflags", {flagskey = "gcc_module_header"}) then
+ if compinst:has_flags("-fmodule-header", "cxxflags", {snippet = snippet, flagskey = "gcc_module_header"}) then
moduleheaderflag = "-fmodule-header="
end
_g.moduleheaderflag = moduleheaderflag or false