mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-13 10:51:35 +00:00
Chromium's BUILD files try to avoid uses of exec_script when possible because they slow down every GN invocation. In preparation for building Dawn inside Chromium, the calls to exec_script for the code generator are removed. In GN, the generator now outputs a "JSON tarball", a dictionnary mapping filenames to content. This allows us to use the "depfile" feature of GN to avoid the exec_script call to gather the script's inputs. Outputs of the generator are now listed in the BUILD.gn files. To keep it in sync with the generator, GN outputs a file containing "expected outputs" that is checked by the code generator. Finally the dawn_generator GN template doesn't create a target anymore, but users are expected to gather outputs using get_target_outputs.