Skip to content

Commit

Permalink
Work around surprise x264 compile error
Browse files Browse the repository at this point in the history
On 32 bit Android. This used to work fine earlier this week, but
suddenly this warning about an implicitly declared function turned into
an error. We now revert it back to a warning.
  • Loading branch information
askmeaboutlo0m committed Aug 4, 2024
1 parent b6892d6 commit fe9030a
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions .github/scripts/build-ffmpeg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,29 @@ if(LIBVPX)
endif()

if(LIBX264)
set(x264_configure_args
--enable-static
--enable-pic
--disable-lavf
--disable-swscale
--disable-avs
--disable-ffms
--disable-gpac
--disable-lsmash
--disable-bashcompletion
--disable-cli
--enable-strip
)

# Configure only checks if *linkage* of functions works, but not if they're
# actually present in any headers. This causes weird compile errors about
# fseeko and ftello not being present on 32 bit Android. The code appears
# to work fine though, so either this doesn't matter or we don't hit that
# code. So we just disable the error and carry on.
if(ANDROID AND TARGET_ARCH STREQUAL "arm32")
list(APPEND x264_configure_args "--extra-cflags=-Wno-error=implicit-function-declaration")
endif()

build_dependency(x264 ${LIBX264} ${BUILD_TYPE}
URL https://code.videolan.org/videolan/x264/-/archive/@version@/x264-@[email protected]
TARGET_ARCH "${TARGET_ARCH}"
Expand All @@ -174,18 +197,7 @@ if(LIBX264)
ALL_PLATFORMS
AUTOMAKE
ASSIGN_HOST ASSIGN_PREFIX WIN32_CC_CL
ALL
--enable-static
--enable-pic
--disable-lavf
--disable-swscale
--disable-avs
--disable-ffms
--disable-gpac
--disable-lsmash
--disable-bashcompletion
--disable-cli
--enable-strip
ALL ${x264_configure_args}
)
endif()

Expand Down

0 comments on commit fe9030a

Please sign in to comment.