Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3486)

Unified Diff: build/common.gypi

Issue 10827273: Change Android build configurations (step 1). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed changes to scripts from this change. Will do the change in a separate CL. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index 4165e191f9d9ded80b9de547358e43548d9a7dec..92e1057f69757834ef016048ab32e6b82e2a61b7 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -1937,6 +1937,8 @@
}],
],
}],
+ # TODO(wangxianzhu): Remove this. This is temporarily kept before
+ # default build type switched to Debug.
# Android enables DCHECK()s on non-Official release builds.
['OS=="android" and buildtype!="Official"', {
'defines!': ['NDEBUG'],
@@ -2026,25 +2028,22 @@
],
'conditions' : [
['OS=="android"', {
+ # Some configurations are copied from Release_Base to reduce
+ # the binary size.
+ 'variables': {
+ 'debug_optimize%': 's',
+ },
'cflags': [
- '-fno-omit-frame-pointer',
+ '-fno-ident',
+ '-fomit-frame-pointer',
+ '-fdata-sections',
+ '-ffunction-sections',
+ ],
+ 'ldflags': [
+ '-Wl,-O1',
+ '-Wl,--as-needed',
+ '-Wl,--gc-sections',
],
- }],
- ],
- 'target_conditions' : [
- ['_toolset=="target"', {
- 'conditions': [
- ['OS=="android" and debug_optimize==0 and target_arch=="arm"', {
- 'cflags': [
- '-mlong-calls', # Needed when compiling with -O0
- ],
- }],
- ['arm_thumb==1', {
- 'cflags': [
- '-marm',
- ],
- }],
- ],
}],
],
},
@@ -2502,16 +2501,15 @@
'libvpx_path': 'lib/linux/arm',
},
'target_defaults': {
- # Build a Release build by default to match Android build behavior.
- # This is typical with Android because Debug builds tend to be much
- # larger and run very slowly on constrained devices. It is still
- # possible to do a Debug build by specifying BUILDTYPE=Debug on the
- # 'make' command line.
+ # TODO(wangxianzhu): We used to build Release version with DCHECK
+ # by default. Now we build Release without DCHECK, and build Debug
+ # with size optimizations. Remove the following line after everyone
+ # knows how to deal with the change.
'default_configuration': 'Release',
'variables': {
'release_extra_cflags%': '',
- },
+ },
'target_conditions': [
# Settings for building device targets using Android's toolchain.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698