Skip to content

Commit

Permalink
Add restat = 1 to Swift compile rule
Browse files Browse the repository at this point in the history
The swift compiler does not update the modification time of output
object files when the code has not changed. Without this, Swift
targets may continuously be rebuilt.
  • Loading branch information
2xsaiko authored and dcbaker committed Feb 17, 2025
1 parent 5442f04 commit 1b54239
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mesonbuild/backend/ninjabackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -2449,7 +2449,7 @@ def generate_swift_compile_rules(self, compiler) -> None:

command = invoc + ['$ARGS', '$in']
description = 'Compiling Swift source $in'
self.add_rule(NinjaRule(rule, command, [], description))
self.add_rule(NinjaRule(rule, command, [], description, extra='restat = 1'))

def use_dyndeps_for_fortran(self) -> bool:
'''Use the new Ninja feature for scanning dependencies during build,
Expand Down

0 comments on commit 1b54239

Please sign in to comment.