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>
This commit is contained in:
Corentin Wallez 2022-11-22 11:07:27 +00:00 committed by Dawn LUCI CQ
parent ccd369861f
commit c94696afdd
2 changed files with 5 additions and 4 deletions

View File

@ -41,10 +41,11 @@ import("generator_lib.gni")
#
template("dawn_generator") {
generator_lib_action(target_name) {
forward_variables_from(invoker, "*")
forward_variables_from(invoker, "*", [ "script" ])
script = get_path_info(invoker.script, "abspath")
# Set arguments required to find the python libraries for the generator
generator_lib_dir = "${dawn_root}/generator"
generator_lib_dir = get_path_info("${dawn_root}/generator", "abspath")
jinja2_path = dawn_jinja2_dir
# Force Dawn's autogenerated file structure to mirror exactly the source

View File

@ -57,7 +57,7 @@ template("generator_lib_action") {
}
_generator_args += [
"--template-dir",
rebase_path(_template_dir),
rebase_path(_template_dir, root_build_dir),
]
if (defined(invoker.root_dir)) {
@ -70,7 +70,7 @@ template("generator_lib_action") {
if (defined(invoker.jinja2_path)) {
_generator_args += [
"--jinja2-path",
rebase_path(invoker.jinja2_path),
rebase_path(invoker.jinja2_path, root_build_dir),
]
}