New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 615083 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: ----



Sign in to add a comment

BuildConfig.java always compiles `sIsDebug` to false

Reported by dolo...@amazon.com, May 26 2016

Issue description

This bug is concerned with //base/android/java/templates/BuildConfig.template which gets compiled into org.chromium.base.BuildConfig.java using the C++ preprocessor

There are actually two bugs with this variable, one of which masks the other
1) The logic for making it true and false are flipped and `#if defined(NDEBUG)` should make `sIsDebug` false and the `#else` should be true. The alternative would be to switch `NDEBUG` with `DEBUG` as Chromium uses that macro often in place of `#if !defined(NDEBUG)`
2) The build flags appear to not be passed into the preprocessor as the contents of the file in //out/<debug or release folder>/gen/templates/base_build_config_gen/org/chromium/base/BuildConfig.java shows sIsDebug is false in both Debug and Release Android builds.  Swapping NDEBUG with DEBUG does not change the result as the `#else` block appears to always be evaluated.
 
Cc: tedc...@chromium.org
Owner: wnwen@chromium.org

Comment 3 by wnwen@chromium.org, Jun 6 2016

Cc: wnwen@chromium.org
Owner: smaier@chromium.org
Status: Assigned (was: Unconfirmed)
Yes, thanks for filing the bug. Sam actually already found these issues and will be fixing it.

Comment 4 by wnwen@chromium.org, Jun 6 2016

Cc: agrieve@chromium.org

Comment 5 by wnwen@chromium.org, Jun 6 2016

Cc: jbudorick@chromium.org
 Issue 610484  has been merged into this issue.
Project Member

Comment 6 by bugdroid1@chromium.org, Jun 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6174a5f8b59fcfd3dbc7273faa27851cea6c9467

commit 6174a5f8b59fcfd3dbc7273faa27851cea6c9467
Author: smaier <smaier@chromium.org>
Date: Fri Jun 10 13:33:02 2016

Adding option for Proguard jar to be switched.

Additionally, adds the is_java_debug gn arg, which can now be set
separately from is_debug, which will control Java specific debug
features, such as Proguard, multidexing, and incremental dexing.

BUG= 616831 , 615082 , 615083 

Review-Url: https://codereview.chromium.org/2031033002
Cr-Commit-Position: refs/heads/master@{#399172}

[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/android_webview/system_webview_apk_tmpl.gni
[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/base/BUILD.gn
[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/base/android/java/templates/BuildConfig.template
[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/build/config/android/config.gni
[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/build/config/android/internal_rules.gni
[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/build/config/android/rules.gni
[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/chrome/android/BUILD.gn
[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/chrome/android/chrome_public_apk_tmpl.gni
[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/chrome/android/java/src/org/chromium/chrome/browser/ChromeStrictMode.java
[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/components/cronet/android/BUILD.gn

Comment 7 by smaier@chromium.org, Jun 13 2016

Status: Fixed (was: Assigned)
Both points 1 and 2 were fixed by the above CL.
Project Member

Comment 8 by bugdroid1@chromium.org, Jun 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6174a5f8b59fcfd3dbc7273faa27851cea6c9467

commit 6174a5f8b59fcfd3dbc7273faa27851cea6c9467
Author: smaier <smaier@chromium.org>
Date: Fri Jun 10 13:33:02 2016

Adding option for Proguard jar to be switched.

Additionally, adds the is_java_debug gn arg, which can now be set
separately from is_debug, which will control Java specific debug
features, such as Proguard, multidexing, and incremental dexing.

BUG= 616831 , 615082 , 615083 

Review-Url: https://codereview.chromium.org/2031033002
Cr-Commit-Position: refs/heads/master@{#399172}

[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/android_webview/system_webview_apk_tmpl.gni
[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/base/BUILD.gn
[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/base/android/java/templates/BuildConfig.template
[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/build/config/android/config.gni
[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/build/config/android/internal_rules.gni
[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/build/config/android/rules.gni
[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/chrome/android/BUILD.gn
[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/chrome/android/chrome_public_apk_tmpl.gni
[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/chrome/android/java/src/org/chromium/chrome/browser/ChromeStrictMode.java
[modify] https://crrev.com/6174a5f8b59fcfd3dbc7273faa27851cea6c9467/components/cronet/android/BUILD.gn

Sign in to add a comment