[bazel] Generate driver workarounds file

With GN, this can be done by setting the GN arg
and then running
    ninja -C out/Generate workaround_list

Now with Bazel, this can be done with:
    bazel run //tools:generate_workarounds

The reason we need to generate a Python script to run
our Python script is that we need Bazel to run the
script from the Skia root directory so it can modify
the //include/gpu/GrDriverBugWorkaroundsAutogen.h

By generating a script, users don't have to remember
to add on a special Bazel CLI argument [1]:
    --run_under='cd $SKIA_ROOT &&'

[1] https://bazel.build/docs/user-manual#run_under

Change-Id: I81d74392382b2791c7555a1e8e5105bd87776973
Bug: b/257466108
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/600436
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2 files changed