BuildConfig.java always compiles `sIsDebug` to false
Reported by
dolo...@amazon.com,
May 26 2016
|
|||||
Issue descriptionThis 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.
,
Jun 3 2016
,
Jun 6 2016
Yes, thanks for filing the bug. Sam actually already found these issues and will be fixing it.
,
Jun 6 2016
,
Jun 6 2016
,
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
,
Jun 13 2016
Both points 1 and 2 were fixed by the above CL.
,
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 |
|||||
Comment 1 by rsgav...@chromium.org
, Jun 3 2016