Add explanatory comment to fuzzer build files
This change adds a comment related to the use of host_toolchain to account for cross compilation, and removes a print statement that had been accidentally left in a build script. Bug: tint:966 Change-Id: I6334225864632d9983ab197bb28fcb972d5ba1d4 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/58000 Auto-Submit: Alastair Donaldson <afdx@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
5db7d38c13
commit
bbda5723da
|
@ -31,11 +31,13 @@ if (build_with_chromium) {
|
||||||
|
|
||||||
fuzzer_corpus_spirv_dir = "${target_gen_dir}/fuzzer_corpus_spirv"
|
fuzzer_corpus_spirv_dir = "${target_gen_dir}/fuzzer_corpus_spirv"
|
||||||
action("tint_generate_spirv_corpus") {
|
action("tint_generate_spirv_corpus") {
|
||||||
|
# The spirv-as tool is used to turn SPIR-V assembly files into binary form.
|
||||||
|
# When cross compiling, it is important that spirv-as is built for the
|
||||||
|
# *host* tool chain, and that the host version of spirv-as is used to
|
||||||
|
# prepare the corpus.
|
||||||
spirv_as_target = "${tint_spirv_tools_dir}/:spirv-as(${host_toolchain})"
|
spirv_as_target = "${tint_spirv_tools_dir}/:spirv-as(${host_toolchain})"
|
||||||
spirv_as_out_dir = get_label_info(spirv_as_target, "root_out_dir")
|
spirv_as_out_dir = get_label_info(spirv_as_target, "root_out_dir")
|
||||||
deps = [ spirv_as_target ]
|
deps = [ spirv_as_target ]
|
||||||
|
|
||||||
script = "generate_spirv_corpus.py"
|
script = "generate_spirv_corpus.py"
|
||||||
sources = [ "generate_spirv_corpus.py" ]
|
sources = [ "generate_spirv_corpus.py" ]
|
||||||
args = [ rebase_path("${tint_root_dir}/test", root_build_dir), rebase_path(fuzzer_corpus_spirv_dir, root_build_dir), rebase_path("${spirv_as_out_dir}/spirv-as", root_build_dir) ]
|
args = [ rebase_path("${tint_root_dir}/test", root_build_dir), rebase_path(fuzzer_corpus_spirv_dir, root_build_dir), rebase_path("${spirv_as_out_dir}/spirv-as", root_build_dir) ]
|
||||||
|
|
|
@ -49,7 +49,6 @@ def main():
|
||||||
input_dir: str = os.path.abspath(sys.argv[1].rstrip(os.sep))
|
input_dir: str = os.path.abspath(sys.argv[1].rstrip(os.sep))
|
||||||
corpus_dir: str = os.path.abspath(sys.argv[2])
|
corpus_dir: str = os.path.abspath(sys.argv[2])
|
||||||
spirv_as_path: str = os.path.abspath(sys.argv[3])
|
spirv_as_path: str = os.path.abspath(sys.argv[3])
|
||||||
print(' '.join([input_dir, corpus_dir, spirv_as_path]))
|
|
||||||
if os.path.exists(corpus_dir):
|
if os.path.exists(corpus_dir):
|
||||||
shutil.rmtree(corpus_dir)
|
shutil.rmtree(corpus_dir)
|
||||||
os.makedirs(corpus_dir)
|
os.makedirs(corpus_dir)
|
||||||
|
|
Loading…
Reference in New Issue