[New custom build] Implement the new custom build command#763
[New custom build] Implement the new custom build command#763tomaka wants to merge 11 commits intorust-lang:masterfrom
Conversation
src/cargo/ops/cargo_rustc/job.rs
Outdated
|
Ok, I've looked this over and added some comments here and there, thanks @tomaka! Could you also add some tests along these lines:
The list of things you plan on adding after this gets merged looks great, I hope to merge this soon! Some specific comments:
This is currently mainly used for feeding information into
Could you elaborate a little more on this? |
|
Ah, and one other recommendation for tests: Could you pass |
I re-read Cargo's source code, and apparently I was mistaken. When I modified |
|
Ok, sounds good to me! |
3223825 to
c1ed49c
Compare
|
For the record, here's what remains to be done before merging:
|
Does include:
target/build/$pkg, its output is written in the same directory in theoutputfile, and it hastarget/build/$pkg/outavailable to write temporary filesoutputfiles are later loaded by each rustc invocation and other custom build command, in order to retreive the rustc-flags orDEP_variables.plugintofor_hostDoes not include:
links, I plan to add this after this PR is mergedDEP_<links>_<key>: You just need to uncomment a block of code, but this can't be implemented without support forlinksrustc-flagsare correctly passed to rustc, because rustc doesn't support the-lflag yet. I'll add this to the PR once rust supports it (or maybe even before if I compile the fork of rustc that has it).The test supposed to check whether a custom build script failure triggers a compilation failure for the whole project is commented out, because I didn't find a way to get the name of the package to match the exact error message. This will need to be fixed before merging.CompilationstructThebuilddirectory is not used when determining the fingerprint, something that was apparently done for thenativedirectoryI recommend reviewing commit by commit. I implemented each feature one by one (tests should pass for each individual commit).
cc #610