Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chrome] don't touch default min sdk version #19

Conversation

unicornx
Copy link

@unicornx unicornx commented Mar 6, 2023

target all_jdk_libs will call r8 to shrink the code-size and use default_min_sdk_version as value of argument of "--min-api". In this version r8 fails when min api >=26.

So we should not set argument of default_min_sdk_version, instead we can directly set argument of android64_ndk_api_level, which gn will use to set the cflag of "--target".

Setting argument of default_min_sdk_version also can change the default value of android64_ndk_api_level, but now seems it is not the correct place because it will impact other logic, such as r8.

Test: make ninja T=build/android:all_jdk_libs

target `all_jdk_libs` will call [r8 to shrink the code-size][1] and use
`default_min_sdk_version` as value of argument of "--min-api". In this
version r8 fails when min api >=26.

So we should not set argument of `default_min_sdk_version`, instead we
can directly set argument of `android64_ndk_api_level`, which gn will
use to set the cflag of "--target".

Setting argument of `default_min_sdk_version` also can change the
default value of `android64_ndk_api_level`, but now seems it is not the
correct place because it will impact other logic, such as r8.

Test: make ninja T=build/android:all_jdk_libs

[1]:https://nphausg.medium.com/android-journey-proguard-d8-r8-what-are-they-e8f2bfe079a7

Signed-off-by: Wang Chen <wangchen20@iscas.ac.cn>
@unicornx unicornx requested a review from McKnight22 March 6, 2023 02:35
@unicornx unicornx self-assigned this Mar 6, 2023
@unicornx unicornx merged commit ebe467f into aosp-riscv:riscv64_109.0.5414.87_dev Mar 6, 2023
@unicornx unicornx changed the title don't touch default min sdk version [chrome] don't touch default min sdk version Mar 10, 2023
@unicornx unicornx deleted the pr-chrome-build-20230306-1 branch April 3, 2023 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants