[build] Conditionally print to stdout on Android

This adds a gyp/gn variable to control printing to stdout
on Android. This is false by default and true for all
v8 stand-alone android bots.

BUG=chromium:629806

Review-Url: https://codereview.chromium.org/2183063002
Cr-Commit-Position: refs/heads/master@{#38253}
This commit is contained in:
machenbach 2016-08-02 08:35:24 -07:00 committed by Commit bot
parent 99460bc441
commit 4289c28fb9
4 changed files with 16 additions and 3 deletions

View File

@ -19,6 +19,9 @@ import("//build_overrides/v8.gni")
import("snapshot_toolchain.gni")
declare_args() {
# Print to stdout on Android.
v8_android_log_stdout = false
# Sets -DVERIFY_HEAP.
v8_enable_verify_heap = false
@ -313,6 +316,9 @@ config("toolchain") {
ldflags += [ "/STACK:2097152" ]
}
}
if (is_android && v8_android_log_stdout) {
defines += [ "V8_ANDROID_LOG_STDOUT" ]
}
# TODO(jochen): Support v8_enable_prof on Windows.
# TODO(jochen): Add support for compiling with simulators.

View File

@ -1116,7 +1116,6 @@
'target_defaults': {
'defines': [
'ANDROID',
'V8_ANDROID_LOG_STDOUT',
],
'configurations': {
'Release': {

View File

@ -57,6 +57,9 @@
# Similar to the ARM hard float ABI but on MIPS.
'v8_use_mips_abi_hardfloat%': 'true',
# Print to stdout on Android.
'v8_android_log_stdout%': 0,
# Force disable libstdc++ debug mode.
'disable_glibcxx_debug%': 0,
@ -1082,6 +1085,11 @@
}],
],
}],
['OS=="android" and v8_android_log_stdout==1', {
'defines': [
'V8_ANDROID_LOG_STDOUT',
],
}],
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
or OS=="netbsd" or OS=="qnx" or OS=="aix"', {
'conditions': [

View File

@ -389,8 +389,8 @@
'mixins': {
'android': {
'gn_args': 'target_os="android"',
'gyp_defines': 'OS=android',
'gn_args': 'target_os="android" v8_android_log_stdout=true',
'gyp_defines': 'OS=android v8_android_log_stdout=1',
},
'arm': {