diff --git a/BUILD.gn b/BUILD.gn index 466fac63cc..5f7f66c765 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -44,6 +44,10 @@ declare_args() { # Enable slow dchecks. v8_enable_slow_dchecks = false + # Indicate if valgrind was fetched as a custom deps to make it available on + # swarming. + v8_has_valgrind = false + # Interpreted regexp engine exists as platform-independent alternative # based where the regular expression is compiled to a bytecode. v8_interpreted_regexp = false diff --git a/gni/isolate.gni b/gni/isolate.gni index e6d166c460..c2c025ce0c 100644 --- a/gni/isolate.gni +++ b/gni/isolate.gni @@ -101,6 +101,11 @@ template("v8_isolate_run") { } else { use_snapshot = "false" } + if (v8_has_valgrind) { + has_valgrind = "1" + } else { + has_valgrind = "0" + } # Note, all paths will be rebased in isolate_driver.py to be relative to # the isolate file. @@ -132,7 +137,7 @@ template("v8_isolate_run") { "--config-variable", "gcmole=0", "--config-variable", - "has_valgrind=0", + "has_valgrind=$has_valgrind", "--config-variable", "icu_use_data_file_flag=$icu_use_data_file_flag", "--config-variable", diff --git a/infra/mb/mb_config.pyl b/infra/mb/mb_config.pyl index 79d5b480c2..fa4da999f8 100644 --- a/infra/mb/mb_config.pyl +++ b/infra/mb/mb_config.pyl @@ -544,8 +544,7 @@ }, 'valgrind': { - # TODO(machenbach): Add this to gn. - 'gn_args': 'has_valgrind=true', + 'gn_args': 'v8_has_valgrind=true', 'gyp_defines': 'has_valgrind=1', },