-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config/functions: add C++ compiler and linker flags to meson.conf #3468
Conversation
Due to missing cpp_args and cpp_link_args in meson.conf ninja builds of projects with C++ code were performed without CPU optimization flags (-march, -mcpu, -mtune etc). Add these args so C++ code is built with proper flags. Signed-off-by: Matthias Reichl <[email protected]>
68cffda
to
24e31c0
Compare
@@ -386,6 +386,8 @@ endian = '$endian' | |||
root = '$root' | |||
$(python -c "import os; print('c_args = {}'.format([x for x in os.getenv('CFLAGS').split()]))") | |||
$(python -c "import os; print('c_link_args = {}'.format([x for x in os.getenv('LDFLAGS').split()]))") | |||
$(python -c "import os; print('cpp_args = {}'.format([x for x in os.getenv('CXXFLAGS').split()]))") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mixing cpp and cxx looks wrong.
should it more like 'cpp_args -> CPPFLAGS' and 'cxx_args -> CXXFLAGS' ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh holy...
you are right: meson uses cpp_args for c++. really confusing
https://mesonbuild.com/Builtin-options.html#compiler-options
Tested with |
This PR results in a nice reduction on Generic (
|
Due to missing cpp_args and cpp_link_args in meson.conf ninja builds
of projects with C++ code were performed without CPU optimization
flags (-march, -mcpu, -mtune etc). Add these args so C++ code is
built with proper flags.