avoid directories for cargo build dependencies
We are facing peculiar Windows-only regressions in build times in https://bugzilla.mozilla.org/show_bug.cgi?id=1506511 and while the build times might just be Windows being slow, putting directories in `rerun-if-changed` might also be causing problems. The build only depends on the files, anyway, so let's just say that.
This commit is contained in:
@@ -22,22 +22,11 @@ except ImportError:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def source_files(top):
|
|
||||||
# type: (str) -> Iterable[str]
|
|
||||||
"""
|
|
||||||
Recursively find all interesting source files and directories in the
|
|
||||||
directory tree starting at top. Yield a path to each file.
|
|
||||||
"""
|
|
||||||
for (dirpath, dirnames, filenames) in os.walk(top):
|
|
||||||
yield dirpath
|
|
||||||
for f in filenames:
|
|
||||||
if f.endswith('.py'):
|
|
||||||
yield join(dirpath, f)
|
|
||||||
|
|
||||||
|
|
||||||
def generate():
|
def generate():
|
||||||
# type: () -> None
|
# type: () -> None
|
||||||
print("Dependencies from meta language directory:")
|
print("Dependencies from meta language directory:")
|
||||||
meta = dirname(abspath(__file__))
|
meta = dirname(abspath(__file__))
|
||||||
for path in source_files(meta):
|
for (dirpath, _, filenames) in os.walk(meta):
|
||||||
print("cargo:rerun-if-changed=" + path)
|
for f in filenames:
|
||||||
|
if f.endswith('.py'):
|
||||||
|
print("cargo:rerun-if-changed=" + join(dirpath, f))
|
||||||
|
|||||||
Reference in New Issue
Block a user