Fix ICD build when using multiple toolchains.

We should be using root_out_dir, not root_build_dir. This was causing
issues with NaCL. GN descriptions:

root_out_dir: [string] Root directory for toolchain output files.
root_build_dir: [string] Directory where build commands are run.

Bug: dawn:283
Change-Id: I0730b96d303151b715672d6937031e557e1994f0
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38748
Reviewed-by: Corentin Wallez <cwallez@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/Vulkan/BUILD.gn b/src/Vulkan/BUILD.gn
index 701ed4d..cb804b4 100644
--- a/src/Vulkan/BUILD.gn
+++ b/src/Vulkan/BUILD.gn
@@ -189,7 +189,7 @@
 # Generates an ICD JSON file that can be used by all targets in this GN build
 # (ANGLE, Dawn, Chromium).
 action("icd_file") {
-  output_icd_file = "${root_build_dir}/${swiftshader_icd_file_name}"
+  output_icd_file = "${root_out_dir}/${swiftshader_icd_file_name}"
   input_file = swiftshader_icd_file_name
 
   if (is_win) {
@@ -203,9 +203,9 @@
   script = "write_icd_json.py"
   args = [
     "--input",
-    rebase_path(input_file, root_build_dir),
+    rebase_path(input_file, root_out_dir),
     "--output",
-    rebase_path(output_icd_file, root_build_dir),
+    rebase_path(output_icd_file, root_out_dir),
     "--library_path",
     library_path,
   ]
diff --git a/src/Vulkan/vulkan.gni b/src/Vulkan/vulkan.gni
index 15854e9..30bab67 100644
--- a/src/Vulkan/vulkan.gni
+++ b/src/Vulkan/vulkan.gni
@@ -15,6 +15,6 @@
 # File containing GN "constants" for Swiftshader Vulkan so that GN-based
 # projects depending on Swiftshader don't need to hardcode them.
 
-# The name of the Swiftshader Vulkan ICD file in the $root_build_dir that's
+# The name of the Swiftshader Vulkan ICD file in the $root_out_dir that's
 # produced by ${swiftshader_dir}/src/Vulkan:icd_file
 swiftshader_icd_file_name = "vk_swiftshader_icd.json"