Implement infrastructure for the souped-up build command#792
Implement infrastructure for the souped-up build command#792bors merged 28 commits intorust-lang:masterfrom
Conversation
|
I've now added some hopefully extensive documentation about build scripts. |
There was a problem hiding this comment.
do the stability markers not work here?
There was a problem hiding this comment.
For now these are actually just markers of what to remove once we remove the old system of build cmd, not necessarily for deprecated functionality itself.
|
@alexcrichton doc review conducted as asked ❤️ Looks really great, just a couple of nits |
There was a problem hiding this comment.
(Side note: do we have any docs anywhere on target triples?)
There was a problem hiding this comment.
Hm, not that I know of actually. That is... a bit sad though. I'll see if I can find some internet docs to link to.
a4b5fb1 to
ce7c253
Compare
|
Updated with a re-worded code generation example and with lots of nits fixed (thanks @tomaka, @steveklabnik, and @huonw!) I agree @steveklabnik that the last section is lacking. I think I ran out of steam once I reached that point, so I think I'll wait until morning to update it :) |
|
Updated with an expanded "linking to system libraries" section. I'm still not super thrilled about it as I feel like it's just too overwhelming to show tons of code, but it's not super useful without a couple of code examples. It's at the end though and it's a case study so maybe it's not too bad? |
Assorted bug fixes discovered while migrating packages to using this build command infrastructure.
d259798 to
c05442a
Compare
8f93640 to
5e29a8b
Compare
This series of commits (based on #763) is an implementation of the recent [Cargo RFC](https://github.com/rust-lang/rfcs/blob/master/text/0403-cargo-build-command.md). This should implement all portions of the RFC, but there's a lot so an extra set of eyes would be nice! I haven't added documentation for it all yet, but I would like to do so before landing (starting with #749). Otherwise I've been migrating all of the existing cargo dependencies away from the build command to a build script, and the progress can be seen with these repositories: * https://github.com/alexcrichton/gcc-rs * https://github.com/alexcrichton/pkg-config-rs * https://github.com/alexcrichton/git2-rs/tree/build-cmd * https://github.com/alexcrichton/openssl-sys * https://github.com/alexcrichton/flate2-rs/tree/build-cmd * https://github.com/alexcrichton/libz-sys * https://github.com/alexcrichton/ssh2-rs/tree/build-cmd I haven't quite gotten around to curl just yet, but it's next on my list!
| /// | ||
| /// This is currently used to drive some entries which are added to the | ||
| /// LD_LIBRARY_PATH as appropriate. | ||
| // TODO: deprecated, remove |
There was a problem hiding this comment.
Is this TODO correct, @alexcrichton? I.e. should I PR the removal of Compilation.native_dirs, or PR the removal of the TODO?
There was a problem hiding this comment.
Oh dear that's a good question, this PR is... quite old though! I vaguely remember placing this on a few things throughout Cargo I've wished I deleted at the time and then never got to, but removing this would be good if it's not actually used in Cargo today! (or if it's actually used just remove the comment)
…=dwijnand Remove the remote TODO on Compilation.native_dirs It's still used, see tests: * build_script::doctest_receives_build_link_args * build_script::rename_with_link_search_path * run::run_with_library_paths * run::library_paths_sorted_alphabetically Originally I was trying to action #792 (comment) with this PR
This series of commits (based on #763) is an implementation of the recent Cargo RFC. This should implement all portions of the RFC, but there's a lot so an extra set of eyes would be nice!
I haven't added documentation for it all yet, but I would like to do so before landing (starting with #749). Otherwise I've been migrating all of the existing cargo dependencies away from the build command to a build script, and the progress can be seen with these repositories:
I haven't quite gotten around to curl just yet, but it's next on my list!