-
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] Added native
mechanism when cross-building
#15919
[MesonToolchain] Added native
mechanism when cross-building
#15919
Conversation
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 is looking great.
I think I'd prefer a bit more explicit (vs magic replace under the hood) but the ground work is fantastic, lets sync to discuss.
a0fab76
to
f4831bd
Compare
machine_files.insert(0, native) | ||
cmd += "".join([f'--native-file "{file}"' for file in machine_files]) | ||
else: # extra native file for cross-building scenarios | ||
cmd += f' --native-file "{native}"' |
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'm keeping the old behavior.
# Forcing to create the native context too | ||
if cross_building(self): | ||
tc = MesonToolchain(self, native=True) | ||
tc.generate() |
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 decided to keep this quite explicit, but I'm open to talking more 😁
native
mechanism when cross-building
conans/test/functional/toolchains/meson/test_meson_native_attribute.py
Outdated
Show resolved
Hide resolved
…ibute.py Co-authored-by: James <memsharded@gmail.com>
5d23e79
to
8b3ff07
Compare
Changelog: Feature: MesonToolchain can generate a native file if native=True (only makes sense when cross-building).
Changelog: Feature: Meson helper injects native and cross files if both exist.
Docs: conan-io/docs#3710
Closes: #15878