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

Cherry pick PR #622: Update Cobalt Android NDK to 25.2 #661

Merged
merged 1 commit into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docker/linux/android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ RUN cd /tmp \
--sdk_root=${ANDROID_SDK_ROOT} \
"build-tools;30.0.0" \
"build-tools;31.0.0" \
"cmake;3.10.2.4988404" \
"cmake;3.22.1" \
"cmdline-tools;1.0" \
"extras;android;m2repository" \
"extras;google;m2repository" \
"ndk;21.1.6352462" \
"ndk;25.2.9519653" \
"patcher;v4" \
"platforms;android-30" \
"platforms;android-31" \
Expand Down
8 changes: 4 additions & 4 deletions starboard/android/arm/toolchain/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ gcc_toolchain("target") {
cxx = "$prefix/armv7a-linux-androideabi${android_ndk_api_level}-clang++"
ld = cxx
ar = "$prefix/arm-linux-androideabi-readelf"
ar = "$prefix/arm-linux-androideabi-ar"
nm = "$prefix/arm-linux-androideabi-nm"
ar = "ar"
nm = "nm"

toolchain_args = {
is_clang = true
Expand All @@ -36,8 +36,8 @@ gcc_toolchain("native_target") {
cxx = "$prefix/armv7a-linux-androideabi${android_ndk_api_level}-clang++"
ld = cxx
ar = "$prefix/arm-linux-androideabi-readelf"
ar = "$prefix/arm-linux-androideabi-ar"
nm = "$prefix/arm-linux-androideabi-nm"
ar = "ar"
nm = "nm"

toolchain_args = {
is_starboard = false
Expand Down
6 changes: 3 additions & 3 deletions starboard/android/arm64/toolchain/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ gcc_toolchain("target") {
cc = "$prefix/aarch64-linux-android${android_ndk_api_level}-clang"
cxx = "$prefix/aarch64-linux-android${android_ndk_api_level}-clang++"
ld = cxx
readelf = "$prefix/aarch64-linux-android-readelf"
ar = "$prefix/aarch64-linux-android-ar"
nm = "$prefix/aarch64-linux-android-nm"
readelf = "readelf"
ar = "ar"
nm = "nm"

toolchain_args = {
is_clang = true
Expand Down
6 changes: 3 additions & 3 deletions starboard/android/arm64/vulkan/toolchain/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ gcc_toolchain("target") {
cc = "$prefix/aarch64-linux-android${android_ndk_api_level}-clang"
cxx = "$prefix/aarch64-linux-android${android_ndk_api_level}-clang++"
ld = cxx
readelf = "$prefix/aarch64-linux-android-readelf"
ar = "$prefix/aarch64-linux-android-ar"
nm = "$prefix/aarch64-linux-android-nm"
readelf = "readelf"
ar = "ar"
nm = "nm"

toolchain_args = {
is_clang = true
Expand Down
4 changes: 2 additions & 2 deletions starboard/android/shared/download_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ echo "Updating the SDK..."
# Update the installation
${SDK_MANAGER_TOOL} --sdk_root=${ANDROID_SDK_ROOT} \
"build-tools;31.0.0" \
"cmake;3.10.2.4988404" \
"cmake;3.22.1" \
"cmdline-tools;1.0" \
"extras;android;m2repository" \
"extras;google;m2repository" \
"ndk;21.1.6352462" \
"ndk;25.2.9519653" \
"patcher;v4" \
"platforms;android-31" \
"platform-tools"
Expand Down
9 changes: 9 additions & 0 deletions starboard/android/shared/platform_configuration/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ config("platform_configuration") {

# Don"t warn for implicit sign conversions. (in v8 and protobuf)
"-Wno-sign-conversion",

# TODO: b/287129945 - Fix compiler warnings
"-Wno-implicit-const-int-float-conversion",

# TODO: b/287320271 - Fix compiler warnings
"-Wno-deprecated-copy",

# TODO: b/287324882 - Fix compiler warnings
"-Wno-unused-but-set-variable",
]
defines += [
# Enable compile-time decisions based on the ABI
Expand Down
4 changes: 2 additions & 2 deletions starboard/android/shared/sdk_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

# Which version of the Android NDK and CMake to install and build with.
# Note that build.gradle parses these out of this file too.
_NDK_VERSION = '21.1.6352462'
_CMAKE_VERSION = '3.10.2.4988404'
_NDK_VERSION = '25.2.9519653'
_CMAKE_VERSION = '3.22.1'

_STARBOARD_TOOLCHAINS_DIR = build.GetToolchainsDir()

Expand Down
6 changes: 6 additions & 0 deletions starboard/android/shared/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@
# when invalid initialization data is passed to
# SbDrmGenerateSessionUpdateRequest().
'SbDrmSessionTest.InvalidSessionUpdateRequestParams',

# TODO: b/288107039 This test crashed after NDK 25 upgrade, re-enable it.
'SbUndefinedBehaviorTest.CallThisPointerIsNullRainyDay',

# TODO: b/288107692 This test crashed on arm64 after NDK 25 upgrade, re-enable it.
'PixelTest.TooManyGlyphs',
],
}
# pylint: enable=line-too-long
Expand Down
2 changes: 1 addition & 1 deletion starboard/android/shared/toolchain/toolchain.gni
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import("//build/config/clang/clang.gni")
declare_args() {
android_sdk_path = getenv("ANDROID_HOME")
android_ndk_path = ""
sb_android_ndk_version = "21.1.6352462"
sb_android_ndk_version = "25.2.9519653"
android_ndk_api_level = 21
}

Expand Down
6 changes: 3 additions & 3 deletions starboard/android/x86/toolchain/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ gcc_toolchain("target") {
cc = "$prefix/i686-linux-android${android_ndk_api_level}-clang"
cxx = "$prefix/i686-linux-android${android_ndk_api_level}-clang++"
ld = cxx
readelf = "$prefix/i686-linux-android-readelf"
ar = "$prefix/i686-linux-android-ar"
nm = "$prefix/i686-linux-android-nm"
readelf = "readelf"
ar = "ar"
nm = "nm"

toolchain_args = {
is_clang = true
Expand Down
4 changes: 2 additions & 2 deletions third_party/zlib/contrib/minizip/zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,8 @@ local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_f
break;
}

if (uPosFound!=0)
break;
if (uPosFound!=0)
break;
}
TRYFREE(buf);
return uPosFound;
Expand Down