| Index: build/nocompile.gni
|
| diff --git a/build/nocompile.gni b/build/nocompile.gni
|
| index c97146452baf6682e8f49e501a6e671d9fd20ae2..2813548fdbc7df350c2f1a4f124b6a32ddfc707e 100644
|
| --- a/build/nocompile.gni
|
| +++ b/build/nocompile.gni
|
| @@ -60,7 +60,8 @@ import("//testing/test.gni")
|
| declare_args() {
|
| # TODO(crbug.com/105388): make sure no-compile test is not flaky.
|
| enable_nocompile_tests =
|
| - (is_linux || is_mac || is_ios) && is_clang && host_cpu == target_cpu
|
| + (host_cpu == target_cpu || (host_cpu == "x64" && target_cpu == "x86")) &&
|
| + (((is_linux || is_mac || is_ios) && is_clang) || is_win)
|
| }
|
|
|
| if (enable_nocompile_tests) {
|
| @@ -73,19 +74,25 @@ if (enable_nocompile_tests) {
|
| sources = invoker.sources
|
|
|
| result_path = "$target_gen_dir/{{source_name_part}}_nc.cc"
|
| - depfile = "${result_path}.d"
|
| + if (!is_win) {
|
| + depfile = "${result_path}.d"
|
| + }
|
| outputs = [
|
| result_path,
|
| ]
|
| - sysroot_args = ""
|
| + additional_args = ""
|
| if (sysroot != "") {
|
| - sysroot_args = " --sysroot " + rebase_path(sysroot, root_build_dir)
|
| + additional_args += " --sysroot " + rebase_path(sysroot, root_build_dir)
|
| + }
|
| + if (is_win) {
|
| + additional_args +=
|
| + " -DNOMINMAX -Wno-unused-parameter -Wno-invalid-constexpr"
|
| }
|
| args = [
|
| "4", # number of compilers to invoke in parallel.
|
| "{{source}}",
|
| "-Wall -Werror -Wfatal-errors " + "-I" +
|
| - rebase_path("//", root_build_dir) + sysroot_args,
|
| + rebase_path("//", root_build_dir) + additional_args,
|
| rebase_path(result_path, root_build_dir),
|
| ]
|
| }
|
|
|