mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 07:36:15 +00:00
Delete the remove_stale_autogen_files mechanism.
Previously when moving around directories for generated files, Dawn ran into an issue where stale files where #included instead of the new ones, causing compilation failures. To get around this a remove_stale_autogen_files mechanism was added that scans the gen/ directory for files not in an allow-list of directories. This mechanism is now causing problems for bringing up Dawn standalone tests on Android as these test also generate files in Dawn's gen/ directories, and their files get deleted by remove_stale_autogen_files. We are not foresseing any additional shuffling of directories and it's safe to expect that all stale files have been removed from CI builder caches at this time. So remove_stale_autogen_files can go. This is what this CL does. Fixed: dawn:1543 Change-Id: I7dbf1eae6c55b7659f3837b6d4a565052001ce57 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103040 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
eebb7d5e52
commit
30f51b94da
@@ -258,12 +258,6 @@ def run_generator(generator):
|
||||
type=str,
|
||||
help=('Optional source root directory for Python dependency '
|
||||
'computations'))
|
||||
parser.add_argument(
|
||||
'--allowed-output-dirs-file',
|
||||
default=None,
|
||||
type=str,
|
||||
help=("File containing a list of allowed directories where files "
|
||||
"can be output."))
|
||||
parser.add_argument(
|
||||
'--print-cmake-dependencies',
|
||||
default=False,
|
||||
@@ -326,32 +320,6 @@ def run_generator(generator):
|
||||
|
||||
outputs = _do_renders(renders, args.template_dir)
|
||||
|
||||
# The caller wants to assert that the outputs are only in specific
|
||||
# directories.
|
||||
if args.allowed_output_dirs_file != None:
|
||||
with open(args.allowed_output_dirs_file) as f:
|
||||
allowed_dirs = set([line.strip() for line in f.readlines()])
|
||||
|
||||
for directory in allowed_dirs:
|
||||
if not directory.endswith('/'):
|
||||
print('Allowed directory entry "{}" doesn\'t '
|
||||
'end with /'.format(directory))
|
||||
return 1
|
||||
|
||||
def check_in_subdirectory(path, directory):
|
||||
return path.startswith(
|
||||
directory) and not '/' in path[len(directory):]
|
||||
|
||||
for render in renders:
|
||||
if not any(
|
||||
check_in_subdirectory(render.output, directory)
|
||||
for directory in allowed_dirs):
|
||||
print('Output file "{}" is not in the allowed directory '
|
||||
'list below:'.format(render.output))
|
||||
for directory in sorted(allowed_dirs):
|
||||
print(' "{}"'.format(directory))
|
||||
return 1
|
||||
|
||||
# Output the JSON tarball
|
||||
if args.output_json_tarball != None:
|
||||
json_root = {}
|
||||
|
||||
Reference in New Issue
Block a user