Add additional build flags for ffmpeg on "arm64-v8a"

From NDK 23.1.7779620 and above, the arm64-v8a ABI needs additional
build flags to correctly link the ffmpeg libraries.

Issue: google/ExoPlayer#9933
PiperOrigin-RevId: 467161973
(cherry picked from commit 6ea1d0ecf0)
This commit is contained in:
tonihei 2022-08-12 09:43:22 +00:00 committed by microkatz
parent 5cc23fd972
commit ea1e26d9dd

View file

@ -21,6 +21,12 @@ set(CMAKE_CXX_STANDARD 11)
project(libffmpegJNI C CXX)
# Additional flags needed for "arm64-v8a" from NDK 23.1.7779620 and above.
# See https://github.com/google/ExoPlayer/issues/9933#issuecomment-1029775358.
if(${ANDROID_ABI} MATCHES "arm64-v8a")
set(CMAKE_CXX_FLAGS "-Wl,-Bsymbolic")
endif()
set(ffmpeg_location "${CMAKE_CURRENT_SOURCE_DIR}/ffmpeg")
set(ffmpeg_binaries "${ffmpeg_location}/android-libs/${ANDROID_ABI}")