You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a few content in meson.build which preprocess something. It basically works but it doesn't when giving -g3 in CFLAGS and preprocessing with gcc because gcc embeds few definitions inline:
I could worked this around like compiler.preprocess(..., compile_args: '-g0') but I'm not sure if it is really portable way.
What is the best way to build such case without any problems?
The text was updated successfully, but these errors were encountered:
GCC documents that macro definitions are included inline with -g3:
Level 3 includes extra information, such as all the macro definitions present in the program. Some debuggers support macro expansion when you use -g3.
It appears that this is actually a Clang bug in that it doesn't map -g3 to its -fdebug-macro option, per llvm/llvm-project#14524, so we should be seeing this behaviour with both GCC and Clang, and it's a bug that we don't with Clang.
But as for compiler.preprocess, I suppose we want to always add -g0 or -fno-debug-macro (?) if supported by the compiler.
Hi,
I have a few content in meson.build which preprocess something. It basically works but it doesn't when giving
-g3
in CFLAGS and preprocessing with gcc because gcc embeds few definitions inline:and it causes the redefinition error.
I could worked this around like
compiler.preprocess(..., compile_args: '-g0')
but I'm not sure if it is really portable way.What is the best way to build such case without any problems?
The text was updated successfully, but these errors were encountered: