summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/gcc.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-10-21 23:17:55 +0800
committerruki <[email protected]>2024-10-21 23:17:55 +0800
commit22b4ab1e3796957173bba4afc6e6e7d54be8b0e9 (patch)
treef3b9dd6c4744732c4f03780130c72326faf4231e /xmake/modules/core/tools/gcc.lua
parent9c42ce00a2aba9448699626b3cfb290c88c0e542 (diff)
suppress gnu-line-marker warnings
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
-rw-r--r--xmake/modules/core/tools/gcc.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index ebc553117..2ff5be449 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -756,6 +756,12 @@ function _preprocess(program, argv, opt)
table.insert(flags, "-fdirectives-only")
end
+ -- suppress -Wgnu-line-marker warnings
+ -- @see https://github.com/xmake-io/xmake/issues/5737
+ if is_gcc or is_clang then
+ table.insert(flags, "-Wno-gnu-line-marker")
+ end
+
-- do preprocess
local cppinfo = try {function ()
if is_host("windows") then