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

Custom build scripts should be able to set rustc flags #8964

Closed
catamorphism opened this issue Sep 3, 2013 · 2 comments
Closed

Custom build scripts should be able to set rustc flags #8964

catamorphism opened this issue Sep 3, 2013 · 2 comments

Comments

@catamorphism
Copy link
Contributor

Related to #8522 but not quite the same: There needs to be a way, in librustpkg/api.rs, to set rustc flags. An example scenario, suggested by @erickt , is to make rustpkg build essentially run:

rustc --linker c++ --link-args $(llvm-config --ldflags --libs all) llvm.rs
@ghost ghost assigned catamorphism Sep 3, 2013
@catamorphism
Copy link
Contributor Author

#8522 will basically address this by exposing all of the rustc flags that rustpkg can set as part of the context, which the API already exposes. There are probably nicer ways.

@catamorphism
Copy link
Contributor Author

I'm going to declare victory here, because the RustcFlags data type is exposed and once you've built a context (using a rustpkg API function), you can replace it with a RustcFlags of your own construction. I'm sure there are nicer ways, but I'll close this until someone has a concrete proposal for an improvement.

@catamorphism catamorphism removed their assignment Jun 16, 2014
flip1995 pushed a commit to flip1995/rust that referenced this issue Jun 16, 2022
Warn about read into zero-length `Vec`

Closes rust-lang#8886

- \[x] Followed [lint naming conventions][lint_naming]
- \[x] Added passing UI tests (including committed `.stderr` file)
- \[x] `cargo test` passes locally
- \[x] Executed `cargo dev update_lints`
- \[x] Added lint documentation
- \[x] Run `cargo dev fmt`

changelog: none
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

1 participant