Commit Graph

6 Commits

Author SHA1 Message Date
Corentin Wallez c94696afdd BUILD.gn: Make toolchain.ninja not contain system absolute paths.
Fixed: chromium:1382452
Change-Id: Ib21745a0c7a171c0a6718a5b3bf431bbf273ae3f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111001
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-11-22 11:07:27 +00:00
Corentin Wallez 30f51b94da 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>
2022-09-20 17:28:33 +00:00
Kai Ninomiya 01aeca22a9 Add .clang-format files and format more files
The .clang-format files tell clang-format to ignore certain directories
(replacing code in lint_clang_format.sh which will be removed).

$ git ls-tree -r master --name-only | grep '\.\(c\|h\|cpp\|gn\|gni\|mm\|m\|py\)$' | xargs ./append-space-to-files
$ git checkout -- generator/templates third_party/khronos/{KHR,vulkan}
$ git cl format --full --python

Followed by manual reformatting of a few things in Python for
readability.

Bug: none
Change-Id: I4c9e472cc9a5cd80c07286e808f4e597cfef5428
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24785
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
2020-07-15 19:51:17 +00:00
Corentin Wallez a9a84dfe1e BUILD.gn: Delete stale generated files in Dawn's gen dir.
This normalizes even more the directory structure of generated files in
Dawn and removes stale autogenerated files that could be included
wrongly using a GN action.

See comment on top of dawn_generator.gni in this commit for more
context.

BUG=dawn:22

Change-Id: I8ec038f949c048431b2b643af4462f98c4ae610b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11361
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-09-19 23:30:42 +00:00
Corentin Wallez 05623df97f BUILD.gn: Add a check generated files are in allowed dirs.
This is important so that we know that the list of allowed directories
is in sync with other parts of the build in follow-up commits.

BUG=dawn:22

Change-Id: I202bec55b510989e43acf497956e2937c9a2f60a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11360
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-09-18 23:19:31 +00:00
David 'Digit' Turner 5dee3e826b [generator_lib]: Make generator_lib.py easier to reuse.
This CL tries to make generator_lib.py easier to reuse in
other projects (e.g. non Dawn-related), by doing the following:

- Removing dawn-specific variables from the script and
  replacing them by path-relative defaults, or through
  additional command-line parameters (e.g. --root-dir can
  now be used to pass the root source directory for Python
  dependency computations).

- Move project-agnostic processing from dawn_generator
  GN template into a new generator_lib:generator_lib_action
  template. The new generator_lib.gni file does not
  contain Dawn-specific settings and can be reused more
  easily outside of Dawn.

+ Replace --extra-python-path with --jinja2-path to be
  more explicit.

+ Add a few documentation comments in the Python scripts.

R=cwallez@chromium.org

Bug: NONE
Change-Id: I3e89f4bc32bdb6a019d251473222c6ce5cdc5f9f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8280
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-06-24 14:31:06 +00:00