Commit 98e26799 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[foozzie] Fix architecture auto-detect with multi-arch builds

The current_cpu value was erroneously removed from the build config json.
In multi-arch builds, each toolchain subdirectory in the build-product
output emits its own build-config json, where current_cpu determines
the architecture type of the sub-build.

Correctness-fuzzer runs could wrongly determined x86 sub-builds as x64.

Bug: chromium:777285
Change-Id: I5104630cd8ebbd263d557fb29771a31a2a1d78c2
Reviewed-on: https://chromium-review.googlesource.com/737797Reviewed-by: 's avatarSergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48950}
parent 1be1dc97
...@@ -837,6 +837,7 @@ action("v8_dump_build_config") { ...@@ -837,6 +837,7 @@ action("v8_dump_build_config") {
is_gcov_coverage = v8_code_coverage && !is_clang is_gcov_coverage = v8_code_coverage && !is_clang
args = [ args = [
rebase_path("$root_out_dir/v8_build_config.json", root_build_dir), rebase_path("$root_out_dir/v8_build_config.json", root_build_dir),
"current_cpu=\"$current_cpu\"",
"dcheck_always_on=$dcheck_always_on", "dcheck_always_on=$dcheck_always_on",
"is_asan=$is_asan", "is_asan=$is_asan",
"is_cfi=$is_cfi", "is_cfi=$is_cfi",
...@@ -847,6 +848,7 @@ action("v8_dump_build_config") { ...@@ -847,6 +848,7 @@ action("v8_dump_build_config") {
"is_tsan=$is_tsan", "is_tsan=$is_tsan",
"is_ubsan_vptr=$is_ubsan_vptr", "is_ubsan_vptr=$is_ubsan_vptr",
"target_cpu=\"$target_cpu\"", "target_cpu=\"$target_cpu\"",
"v8_current_cpu=\"$v8_current_cpu\"",
"v8_enable_i18n_support=$v8_enable_i18n_support", "v8_enable_i18n_support=$v8_enable_i18n_support",
"v8_enable_verify_predictable=$v8_enable_verify_predictable", "v8_enable_verify_predictable=$v8_enable_verify_predictable",
"v8_target_cpu=\"$v8_target_cpu\"", "v8_target_cpu=\"$v8_target_cpu\"",
......
{"v8_target_cpu": "x64"} {"v8_current_cpu": "x64"}
...@@ -127,7 +127,7 @@ def infer_arch(d8): ...@@ -127,7 +127,7 @@ def infer_arch(d8):
executable. executable.
""" """
with open(os.path.join(os.path.dirname(d8), 'v8_build_config.json')) as f: with open(os.path.join(os.path.dirname(d8), 'v8_build_config.json')) as f:
arch = json.load(f)['v8_target_cpu'] arch = json.load(f)['v8_current_cpu']
return 'ia32' if arch == 'x86' else arch return 'ia32' if arch == 'x86' else arch
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment