-
Notifications
You must be signed in to change notification settings - Fork 991
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
[MesonToolchain] Binaries c
, cpp
and ld
(added recently) can be lists
#14676
[MesonToolchain] Binaries c
, cpp
and ld
(added recently) can be lists
#14676
Conversation
aa18d09
to
ff6d3f5
Compare
assert "strip = 'STRIP_VALUE'" in content | ||
assert "as = 'AS_VALUE'" in content | ||
assert "windres = 'WINDRES_VALUE'" in content | ||
assert "pkgconfig = 'PKG_CONFIG_VALUE'" in content |
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.
This test is coming from the test_meson_build_require
. Previously, it was functional, but it shouldn't.
compiler.libcxx=libstdc++11 | ||
build_type=Release | ||
[buildenv] | ||
CC=aarch64-poky-linux-gcc -mcpu=cortex-a53 -march=armv8-a+crc+crypto |
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.
So Meson needs this defined as a list for the c
, cpp
, etc? This reads a bit ugly imho, I'd expect to have the compiler as one thing and the list of flags as cxxflags or similar
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.
I agree with that, but the thing is that you can pass all those arguments to the CC in one shot as a list and it seems to be working as it's said in the issue #14028.
Overall, we're not changing the behavior at all. We agree that this should not be the way to go, but we're only allowing the users to have those compiler and compiler flags together without changing those env variables (up to them). You can check the Meson documentation too (https://mesonbuild.com/Machine-files.html#binaries).
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.
@memsharded This is unforunately how Yocto configures the CC
and similar environment variables out-of-the-box.
"cpp": self.cpp, | ||
"c": _sanitize_format(self.c), | ||
"cpp": _sanitize_format(self.cpp), | ||
"ld": _sanitize_format(self.ld), |
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.
@franramirez688 According to the Meson documentation here, I didn't think using a multivalue argument for the linker options made sense sense it would have to be one of gold
, lld
, bfd
for Clang / GCC and only for MSVC / Clang-Cl should it be an executable. I think this is pretty different behavior than how autotools make use of the LD
environment variable.
Fyi, I really appreciate you improving the interface for this stuff in this PR.
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.
Yeah, indeed @jwillikers
I added that possibility only to be sure that I was not missing any corner case where you could want to pass several arguments to LD. Anyway, I hope consumers will use <>_ld
instead, as Meson recommends in its documentation.
… lists (conan-io#14676) Added mechanism to read CC, CXX, LD as strings or even lists
Changelog: Feature: Added mechanism to transform
c
,cpp
, and/orld
binaries variables from Meson into lists if declared blank-separated strings.Docs: omit
Closes: #14028
Maybe closes: #13824 #14006