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

Rewrite make-win-dist.py in Rust #41568

Closed
alexcrichton opened this issue Apr 26, 2017 · 9 comments
Closed

Rewrite make-win-dist.py in Rust #41568

alexcrichton opened this issue Apr 26, 2017 · 9 comments
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@alexcrichton
Copy link
Member

We've got a now-ancient Python script in the repository which has historically served the purpose of assembling the components of the rust-mingw package that we produce. Historically this was invoked from make, and implementing that script in make would be a nightmare!

Nowadays we've got rustbuild, a build system in Rust, so let's keep leveraging it! This script is called from one location and should be relatively easy rewrite it directly inline. The Rust standard library should have all the tools needed to implement this script.

I'm tagging this as E-easy and E-mentor, please reach out to me if you'd like to take this on and need assistance!

@alexcrichton alexcrichton added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. labels Apr 26, 2017
@wesleywiser
Copy link
Member

I'd like to take this, if that's ok.

@alexcrichton
Copy link
Member Author

@wesleywiser sure thing! Let me know if you need any assistance

@wesleywiser
Copy link
Member

@alexcrichton How should I test my change? I tried running ./x.py dist src\librustc but it fails with:

thread 'main' panicked at '

couldn't find required command: "gcc.exe"

', src\bootstrap\sanity.rs:62

and I'm not sure how to install gcc.exe on Windows.

@retep998
Copy link
Member

retep998 commented May 7, 2017

@wesleywiser You'd follow the instructions in the readme to install msys2 and use that to acquire MinGW.

https://github.com/rust-lang/rust/blob/master/README.md#mingw

@alexcrichton
Copy link
Member Author

@wesleywiser my recommendation would probably be to just run it directly in the sense that I'd run the old script and then the new script. If the outputs are the same then we should be good to go!

@F001
Copy link
Contributor

F001 commented May 9, 2017

@alexcrichton , Are there other scripts need to be rewritten? I am glad to contribute too.

@alexcrichton
Copy link
Member Author

@F001 if you're super ambitious there's also src/etc/platform-intrinsics/generator.py. That's a relatively complicated script and generates the src/librustc_platform_intrinsics crate, although with Cargo and build scripts now we could generate that all at build time instead of checking in generated sources.

If you're interested in tackling that one I could make a tracking issue separately to follow that if you'd like!

@F001
Copy link
Contributor

F001 commented May 10, 2017

@alexcrichton , it sounds great! I'm excited to tackle this one.

@alexcrichton
Copy link
Member Author

@F001 awesome! I've opened an issue to help track that script.

wesleywiser added a commit to wesleywiser/rust that referenced this issue May 15, 2017
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue May 16, 2017
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue May 24, 2017
bors added a commit that referenced this issue May 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

4 participants