Skip to content

ASM Support

Sue N. Cooper edited this page Aug 27, 2023 · 3 revisions

Build scripts of the libraries try to enable all CPU optimizations possible. But some libraries do not support CPU optimizations and configure/build operations fail when asm is enabled.

Below you can see the libraries and architectures that do not support asm. Other than these, all libraries are built with asm enabled.

Android

  • gmp: Enabling assembly produces cannot locate symbol "__gmp_binvert_limb_table" error when library is loaded.
  • gnutls, libass, xvidcore, x264: Enabling asm for x86 ABI causes text relocation errors in libavfilter.so, libavformat.so and libavcodec.so.
  • libass: Library does not support ASM on arm CPUs.
  • libtheora: asm is disabled on LTS releases. Enabling asm causes random crashes on pre API 21 devices.
  • libwebp: This library dropped support for arm-v7a architecture (armeabi-v7a without NEON) with release 1.0.2. Therefore, asm is disabled for arm-v7a architecture.
  • openh264 is built without -DHAVE_NEON flag on arm-v7a-neon architecture. -DHAVE_NEON flag causes undefined symbol errors for WelsCopy8x8_neon.
  • x265: Assembly compilation fails for arm64-v8a architecture. It is possible to build arm-v7a, arm-v7a-neon and x86 with assembly enabled but all three ABIs include relocation errors. Additionally, assembly on x86-64 causes linking errors.

iOS / macOS / tvOS

  • gmp: Enabling assembly on armv7, armv7s, arm64 and arm64e architectures causes configure to fail with configure: error: cannot determine how to define a 32-bit word.

  • kvazaar, libaom, libass, libvpx, openh264: Enabling asm in x86-64 architecture does not cause any compilation errors. But creating xcframework bundles fails with the following error. Assembly is disabled for these libraries in x86-64 architecture to resolve this error.

    The CodingKeys(stringValue: "SupportedPlatform", intValue: nil) is empty in library -x86_64.

  • libass: Library does not support ASM on arm CPUs.

  • libjpeg-turbo: Build fails on i386 architecture with error: symbol '.no_avx2' undefined error.

  • wavpack: Build fails on all arm architectures when asm is enabled.

  • xvidcore: Build fails for i386 architecture when asm is enabled. ffmpeg crashes when asm is enabled on x86-64 architecture.

  • x265: Assembly compilation fails for arm64 and arm64e architectures.

Clone this wiki locally