Skip to content

Commit

Permalink
Android: rename android_build_type gyp variable.
Browse files Browse the repository at this point in the history
Rename the "android_build_type" gyp variable to "android_webview_build"
to better describe what it does. There are still references in WebKit
and V8 that need to be changed before the original variable can be
removed.

BUG=184431

Review URL: https://codereview.chromium.org/12730006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187556 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
torne@chromium.org committed Mar 12, 2013
1 parent 7aba666 commit d999c3c
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 31 deletions.
2 changes: 1 addition & 1 deletion android_webview/android_webview.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
'lib/main/webview_entry_point.cc',
],
'conditions': [
['android_build_type != 0', {
['android_webview_build == 1', {
'libraries': [
# The "android" gyp backend doesn't quite handle static libraries'
# dependencies correctly; force this to be linked as a workaround.
Expand Down
4 changes: 2 additions & 2 deletions base/base.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
'../build/android/cpufeatures.gypi',
],
}],
['OS == "android" and _toolset == "target" and android_build_type == 0', {
['OS == "android" and _toolset == "target" and android_webview_build == 0', {
'dependencies': [
'base_java',
],
Expand Down Expand Up @@ -1131,7 +1131,7 @@
},
'includes': [ '../build/java.gypi' ],
'conditions': [
['android_build_type==0', {
['android_webview_build==0', {
'dependencies': [
'../third_party/jsr-305/jsr-305.gyp:jsr_305_javalib',
],
Expand Down
2 changes: 1 addition & 1 deletion build/android/cpufeatures.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# gyp file in the checked-in NDK to build it.
{
'conditions': [
['android_build_type != 0', {
['android_webview_build == 1', {
'libraries': [
'cpufeatures.a'
],
Expand Down
2 changes: 2 additions & 0 deletions build/android/envsetup_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ ${ANDROID_SDK_VERSION}
'${ANDROID_BUILD_TOP}')")
;;
esac
DEFINES+=" android_webview_build=1"
# temporary until all uses of android_build_type are gone (crbug.com/184431)
DEFINES+=" android_build_type=1"
DEFINES+=" android_src=\$(GYP_ABS_ANDROID_TOP_DIR)"
DEFINES+=" android_sdk=\$(GYP_ABS_ANDROID_TOP_DIR)/${ANDROID_SDK}"
Expand Down
41 changes: 23 additions & 18 deletions build/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,11 @@
# building on.
'target_arch%': '<(host_arch)',

# Sets whether we're building with the Android SDK/NDK (and hence with
# Ant, value 0), or as part of the Android system (and hence with the
# Android build system, value 1).
'android_build_type%': 0,
# This is set when building the Android WebView inside the Android
# build system, using the 'android' gyp backend. The WebView code is
# still built when this is unset, but builds using the normal chromium
# build system.
'android_webview_build%': 0,

# Sets whether chrome is built for google tv device.
'google_tv%': 0,
Expand Down Expand Up @@ -169,7 +170,7 @@
'enable_viewport%': '<(enable_viewport)',
'enable_hidpi%': '<(enable_hidpi)',
'enable_touch_ui%': '<(enable_touch_ui)',
'android_build_type%': '<(android_build_type)',
'android_webview_build%': '<(android_webview_build)',
'google_tv%': '<(google_tv)',
'enable_app_list%': '<(enable_app_list)',
'enable_message_center%': '<(enable_message_center)',
Expand Down Expand Up @@ -483,18 +484,18 @@
}],

# Enable autofill dialog for Android and Views-enabled platforms for now.
['toolkit_views==1 or (OS=="android" and android_build_type==0)', {
['toolkit_views==1 or (OS=="android" and android_webview_build==0)', {
'enable_autofill_dialog%': 1
}],

['OS=="android" and android_build_type==0', {
['OS=="android" and android_webview_build==0', {
'enable_webrtc%': 1,
}],

# Disable WebRTC for building WebView as part of Android system.
# TODO(boliu): Decide if we want WebRTC, and if so, also merge
# the necessary third_party repositories.
['OS=="android" and android_build_type==1', {
['OS=="android" and android_webview_build==1', {
'enable_webrtc%': 0,
}],

Expand Down Expand Up @@ -588,7 +589,7 @@
['OS=="android"', {
# When building as part of the Android system, use system libraries
# where possible to reduce ROM size.
'use_system_libjpeg%': '<(android_build_type)',
'use_system_libjpeg%': '<(android_webview_build)',
}],

# Enable Settings App only on Windows.
Expand Down Expand Up @@ -727,7 +728,7 @@
'wix_path%': '<(wix_path)',
'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
'use_system_libjpeg%': '<(use_system_libjpeg)',
'android_build_type%': '<(android_build_type)',
'android_webview_build%': '<(android_webview_build)',
'google_tv%': '<(google_tv)',
'enable_app_list%': '<(enable_app_list)',
'enable_message_center%': '<(enable_message_center)',
Expand Down Expand Up @@ -990,6 +991,10 @@
'android_app_version_name%': 'Developer Build',
'android_app_version_code%': 0,

# Temporarily set android_build_type until all uses of it have been renamed.
# http://crbug.com/184431
'android_build_type%': '<(android_webview_build)',

'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))',

Expand Down Expand Up @@ -1205,15 +1210,15 @@
# When building as part of the Android system, use system libraries
# where possible to reduce ROM size.
# TODO(steveblock): Investigate using the system version of sqlite.
'use_system_sqlite%': 0, # '<(android_build_type)',
'use_system_expat%': '<(android_build_type)',
'use_system_icu%': '<(android_build_type)',
'use_system_stlport%': '<(android_build_type)',
'use_system_sqlite%': 0, # '<(android_webview_build)',
'use_system_expat%': '<(android_webview_build)',
'use_system_icu%': '<(android_webview_build)',
'use_system_stlport%': '<(android_webview_build)',

'enable_managed_users%': 0,

# Copy it out one scope.
'android_build_type%': '<(android_build_type)',
'android_webview_build%': '<(android_webview_build)',
}], # OS=="android"
['OS=="mac"', {
'variables': {
Expand Down Expand Up @@ -3194,7 +3199,7 @@
'-mllvm -asan-globals=0',
],
}],
['android_build_type==0', {
['android_webview_build==0', {
'defines': [
# The NDK has these things, but doesn't define the constants
# to say that it does. Define them here instead.
Expand All @@ -3207,7 +3212,7 @@
'--sysroot=<(android_ndk_sysroot)',
],
}],
['android_build_type==1', {
['android_webview_build==1', {
'include_dirs': [
# OpenAL headers from the Android tree.
'<(android_src)/frameworks/wilhelm/include',
Expand Down Expand Up @@ -3236,7 +3241,7 @@
'-Wno-sign-promo',
],
}],
['android_build_type==1 and chromium_code==0', {
['android_webview_build==1 and chromium_code==0', {
'cflags': [
# There is a class of warning which:
# 1) Android always enables and also treats as errors
Expand Down
3 changes: 1 addition & 2 deletions content/content.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
},
},
}],

],
},
'conditions': [
Expand Down Expand Up @@ -322,7 +321,7 @@
'java_strings_grd': 'android_content_strings.grd',
},
'conditions': [
['android_build_type == 0', {
['android_webview_build == 0', {
'dependencies': [
'../third_party/eyesfree/eyesfree.gyp:eyesfree_java',
'../third_party/guava/guava.gyp:guava_javalib',
Expand Down
2 changes: 1 addition & 1 deletion content/content_shell.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@
'shell/android/shell_library_loader.h',
],
'conditions': [
['android_build_type==1', {
['android_webview_build==1', {
'ldflags': [
'-lgabi++', # For rtti
],
Expand Down
2 changes: 1 addition & 1 deletion net/net.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@
},
},
],
['OS=="android" and _toolset=="target" and android_build_type == 0', {
['OS=="android" and _toolset=="target" and android_webview_build == 0', {
'dependencies': [
'net_java',
],
Expand Down
4 changes: 2 additions & 2 deletions skia/skia.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@
'ext/vector_platform_device_skia.cc',
],
}],
[ '_toolset == "target" and android_build_type == 0', {
[ '_toolset == "target" and android_webview_build == 0', {
'defines': [
'HAVE_ENDIAN_H',
],
Expand Down Expand Up @@ -597,7 +597,7 @@
'SK_BUILD_FOR_ANDROID_NDK',
],
'conditions': [
[ '_toolset == "target" and android_build_type == 0', {
[ '_toolset == "target" and android_webview_build == 0', {
'defines': [
'HAVE_ENDIAN_H',
],
Expand Down
2 changes: 1 addition & 1 deletion third_party/eyesfree/eyesfree.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# found in the LICENSE file.
{
'conditions': [
['OS == "android" and android_build_type == 0', {
['OS == "android" and android_webview_build == 0', {
'targets': [
{
'target_name': 'eyesfree_java',
Expand Down
2 changes: 1 addition & 1 deletion ui/shell_dialogs.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
],
},
}],
['OS=="android" and android_build_type==0', {
['OS=="android" and android_webview_build==0', {
'dependencies': [
'ui_java',
],
Expand Down
2 changes: 1 addition & 1 deletion ui/ui.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@
],
},
}],
['OS=="android" and android_build_type==0', {
['OS=="android" and android_webview_build==0', {
'dependencies': [
'ui_java',
],
Expand Down

0 comments on commit d999c3c

Please sign in to comment.