Index: build/nocompile.gni |
diff --git a/build/nocompile.gni b/build/nocompile.gni |
index 1b292d79d19f8f226c7b9dea68ff569217652290..d9a9973d368f43e9aaed5bfecdb374fac263af6b 100644 |
--- a/build/nocompile.gni |
+++ b/build/nocompile.gni |
@@ -63,6 +63,7 @@ declare_args() { |
} |
if (enable_nocompile_tests) { |
+ import("//build/config/sysroot.gni") |
template("nocompile_test") { |
nocompile_target = target_name + "_run_nocompile" |
@@ -75,11 +76,15 @@ if (enable_nocompile_tests) { |
outputs = [ |
result_path, |
] |
+ sysroot_args = "" |
+ if (sysroot != "") { |
+ sysroot_args = " --sysroot " + rebase_path(sysroot, root_build_dir) |
+ } |
args = [ |
"4", # number of compilers to invoke in parallel. |
"{{source}}", |
"-Wall -Werror -Wfatal-errors " + "-I" + |
- rebase_path("//", root_build_dir), |
+ rebase_path("//", root_build_dir) + sysroot_args, |
"{{output}}", |
] |
} |