Skip to content

Commit c93ef9b

Browse files
author
Adam C. Foltzer
committed
Use normal depfile rules for Rust targets
The `deps = gcc` rules delete the depfile after it has been read into Ninja's database. This conflicts with the fact that `rustc` puts a target for the depfile itself within the depfile, and so the deleted depfile triggers a rebuild of the whole target. Ninja's normal depfile rules suffice, but won't perform as well for large Rust targets. The alternative seems to be modifying the depfile, though, which seems more gross.
1 parent 1e4cddc commit c93ef9b

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

mesonbuild/backend/ninjabackend.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,13 +1505,10 @@ def generate_rust_compile_rules(self, compiler, outfile):
15051505
command = ' command = %s $ARGS $in\n' % invoc
15061506
description = ' description = Compiling Rust source $in.\n'
15071507
depfile = ' depfile = $targetdep\n'
1508-
1509-
depstyle = ' deps = gcc\n'
15101508
outfile.write(rule)
15111509
outfile.write(command)
15121510
outfile.write(description)
15131511
outfile.write(depfile)
1514-
outfile.write(depstyle)
15151512
outfile.write('\n')
15161513

15171514
def generate_swift_compile_rules(self, compiler, outfile):

0 commit comments

Comments
 (0)