Bug 1454912 - Revert "Bug 1218999 - Update mtimes when building a GENERATED_FILES target, even when contents don't change."; r=nalexander
authorMike Shal <mshal@mozilla.com>
Wed, 09 May 2018 16:51:04 -0400
changeset 418352 9260cc524bb54d9318075578488de8a6f40677eb
parent 418351 1eb04a9bfb7a82eb6fac5e29be7c6b03999d9361
child 418398 380cf87c1ee3966dd94499942b73085754dc4824
child 418399 f288a2c9c4390898a17ad9f964218b52b87d8028
push id33998
push userdluca@mozilla.com
push dateTue, 15 May 2018 21:53:06 +0000
treeherdermozilla-central@9260cc524bb5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1454912, 1218999
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1454912 - Revert "Bug 1218999 - Update mtimes when building a GENERATED_FILES target, even when contents don't change."; r=nalexander We no longer want to update mtimes of FileAvoidWrites so that downstream rules aren't triggered if the files aren't changed. Since the .stub file target of GENERATED_FILES are always touched, make won't continually rebuild them. MozReview-Commit-ID: GxrFgCJTYk
python/mozbuild/mozbuild/action/file_generate.py
--- a/python/mozbuild/mozbuild/action/file_generate.py
+++ b/python/mozbuild/mozbuild/action/file_generate.py
@@ -95,25 +95,16 @@ def main(argv):
                 # Add dependencies on any buildconfig items that were accessed
                 # by the script.
                 deps |= set(buildconfig.get_dependencies())
 
                 mk = Makefile()
                 mk.create_rule([args.dep_target]).add_dependencies(deps)
                 with FileAvoidWrite(args.dep_file) as dep_file:
                     mk.dump(dep_file)
-        # Even when our file's contents haven't changed, we want to update
-        # the file's mtime so make knows this target isn't still older than
-        # whatever prerequisite caused it to be built this time around.
-        try:
-            os.utime(args.output_file, None)
-        except:
-            print('Error processing file "{0}"'.format(args.output_file),
-                  file=sys.stderr)
-            traceback.print_exc()
     except IOError as e:
         print('Error opening file "{0}"'.format(e.filename), file=sys.stderr)
         traceback.print_exc()
         return 1
     return ret
 
 if __name__ == '__main__':
     sys.exit(main(sys.argv[1:]))