diff --git a/python/mozbuild/mozbuild/jar.py b/python/mozbuild/mozbuild/jar.py index 0559a12c29d5..1bf279f711d0 100644 --- a/python/mozbuild/mozbuild/jar.py +++ b/python/mozbuild/mozbuild/jar.py @@ -517,7 +517,9 @@ class JarMaker(object): # copy or symlink if newer - if getModTime(realsrc) > outHelper.getDestModTime(e.output): + # if the output doesn't exist, we can skip an os.stat call + out_mod_time = outHelper.getDestModTime(e.output) + if out_mod_time == localtime(0) or getModTime(realsrc) > out_mod_time: if self.outputFormat == "symlink": outHelper.symlink(realsrc, out) return