Skip to content
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.

Compile libctru with gcc and git2 crates in ctru-sys's build.rs #17

Open
HybridEidolon opened this issue Feb 2, 2017 · 1 comment
Open

Comments

@HybridEidolon
Copy link
Member

This would ensure that the ctru-rs linked is compatible with the libctru version in use; if it is possible, this could be set behind a crate feature to use the system-local libctru.

Downstream, any apps that also link in C dependencies would have to ensure that they do not link the system libctru in addition to the ctru-sys provided one, hence why a feature flag might be useful here.

Just a convenience feature, not sure if it has any real practical use besides maybe unit testing in a docker container or something.

@FenrirWolf
Copy link
Member

Probably not a bad idea in general, though there are a few roadblocks in the way right now. The main thing is that build scripts depend on the standard library, but Xargo replaces libstd with ctr-std, which leaves build scripts without access to std::env or other modules that they normally use for input and output. I'm not sure exactly why that happens, as build scripts work just fine in the template project (which is why I moved the libctru-linking code there for now).

Maybe it can be fixed by changing the way Xargo stages the sysroot, but I haven't found a solution to the issue quite yet.

SeleDreams pushed a commit to SeleDreams/ctru-rs that referenced this issue Jul 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants