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

Choose the correct default target on MSYS2/MinGW64 #244

Open
mgeier opened this issue Jan 10, 2022 · 4 comments
Open

Choose the correct default target on MSYS2/MinGW64 #244

mgeier opened this issue Jan 10, 2022 · 4 comments

Comments

@mgeier
Copy link
Contributor

mgeier commented Jan 10, 2022

I was hoping to get the right target automatically, since I'm using cargo from MSYS2, which should know that it uses the GNU toolchain.

Strangely, when I'm using the MSYS2 package for cargo-c (instead of compiling it on-the-fly), the --target flag is not necessary (see https://github.com/mgeier/cargo-c/runs/4754623622)!

So why does the MSYS2 package of cargo-c do the right thing?

Originally posted by @mgeier in #194 (comment)

@lu-zero
Copy link
Owner

lu-zero commented Jan 10, 2022

it is not something cargo-c controls but defers to cargo (the crate).

@mgeier
Copy link
Contributor Author

mgeier commented Jan 12, 2022

Can you point me to the place where this information is obtained from cargo?
Then I'll create a corresponding issue over there.

But the question remains: Why does the MSYS2 package of cargo-c already do the right thing?

@lu-zero
Copy link
Owner

lu-zero commented Jan 12, 2022

we look up what is in https://docs.rs/cargo/latest/cargo/util/config/struct.Config.html#method.load_global_rustc, I do not know how they are building cargo and how it is different from building the cargo crate as we build it.

@kmilos
Copy link

kmilos commented Dec 28, 2022

FYI, you can follow all the MSYS2 patches and the build recipe here: https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-rust

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

No branches or pull requests

3 participants