Skip to content
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

cargo: Run build.rs to get extra --cfg args #13779

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

xclaesse
Copy link
Member

@xclaesse xclaesse commented Oct 11, 2024

Based on top of #12952.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I've said before, we should not be doing this. At all. We cannot reliably run build.rs, the garden path of cases that actually (and really slowly) manage to successfully run also do not need to be a build.rs so using meson/meson.build will be a superior experience, etc.

The system-deps patch does look quite nice though :) and it's very good that we can do it without build.rs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically, what you actually want is rust-lang/cargo#7178 and to have people opt into that via run_command(), which we already document as an escape hatch to do whatever you want as long as meson doesn't take responsibility for it.

This returns --target value from rustc command line, or the native
target.
@@ -34,6 +34,7 @@
from .. import mparser
from ..environment import Environment
from ..interpreterbase import SubProject
from ..compilers.rust import RustCompiler

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'RustCompiler' is not used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants