Conversation
This is required for downstream Rust dependencies to properly import libraries using `extern crate`.
Codecov Report
@@ Coverage Diff @@
## master #2053 +/- ##
==========================================
+ Coverage 64.01% 64.01% +<.01%
==========================================
Files 72 72
Lines 17222 17223 +1
Branches 3550 3550
==========================================
+ Hits 11025 11026 +1
Misses 5106 5106
Partials 1091 1091
Continue to review full report at Codecov.
|
This seems like a bug in rustc because it is different behaviour from every other compiler. Maybe this could be reported upstream and fixed properly there? Possibly we could report this to Ninja as it is the one deleting the depfile. |
c93ef9b to
1e4cddc
Compare
|
I took that commit out of the branch so that the crate-name can be merged before we figure out how to address the depfile. I can chat with the Rust folks, but are you aware of why Ninja deletes the file in this case? |
|
It's a performance optimisation. In Windows creating thousands of small files is very slow so Ninja deletes them immediately so they never touch the disk. |
|
Gotcha. I'll see if I can get the Rust folks to change this behavior, or at least add an option to remove the depfile target from the output. |
A couple small fixes to improve quality of life for Rustaceans:
First, pass the target name to
rustcas acrate-nameargument, rather than relying on pragmas within the Rust source files. This reduces the extent to which existing Rust sources must be modified in order to work under Meson.Second, use the default Ninja behavior for
rustc-generated depfiles. This prevents unnecessary rebuilding; see c93ef9b.