Commit 4289c28f authored by machenbach's avatar machenbach Committed by Commit bot

[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}
parent 99460bc4
...@@ -19,6 +19,9 @@ import("//build_overrides/v8.gni") ...@@ -19,6 +19,9 @@ import("//build_overrides/v8.gni")
import("snapshot_toolchain.gni") import("snapshot_toolchain.gni")
declare_args() { declare_args() {
# Print to stdout on Android.
v8_android_log_stdout = false
# Sets -DVERIFY_HEAP. # Sets -DVERIFY_HEAP.
v8_enable_verify_heap = false v8_enable_verify_heap = false
...@@ -313,6 +316,9 @@ config("toolchain") { ...@@ -313,6 +316,9 @@ config("toolchain") {
ldflags += [ "/STACK:2097152" ] 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): Support v8_enable_prof on Windows.
# TODO(jochen): Add support for compiling with simulators. # TODO(jochen): Add support for compiling with simulators.
......
...@@ -1116,7 +1116,6 @@ ...@@ -1116,7 +1116,6 @@
'target_defaults': { 'target_defaults': {
'defines': [ 'defines': [
'ANDROID', 'ANDROID',
'V8_ANDROID_LOG_STDOUT',
], ],
'configurations': { 'configurations': {
'Release': { 'Release': {
......
...@@ -57,6 +57,9 @@ ...@@ -57,6 +57,9 @@
# Similar to the ARM hard float ABI but on MIPS. # Similar to the ARM hard float ABI but on MIPS.
'v8_use_mips_abi_hardfloat%': 'true', 'v8_use_mips_abi_hardfloat%': 'true',
# Print to stdout on Android.
'v8_android_log_stdout%': 0,
# Force disable libstdc++ debug mode. # Force disable libstdc++ debug mode.
'disable_glibcxx_debug%': 0, 'disable_glibcxx_debug%': 0,
...@@ -1082,6 +1085,11 @@ ...@@ -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" \ ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
or OS=="netbsd" or OS=="qnx" or OS=="aix"', { or OS=="netbsd" or OS=="qnx" or OS=="aix"', {
'conditions': [ 'conditions': [
......
...@@ -389,8 +389,8 @@ ...@@ -389,8 +389,8 @@
'mixins': { 'mixins': {
'android': { 'android': {
'gn_args': 'target_os="android"', 'gn_args': 'target_os="android" v8_android_log_stdout=true',
'gyp_defines': 'OS=android', 'gyp_defines': 'OS=android v8_android_log_stdout=1',
}, },
'arm': { 'arm': {
......
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