Hello, Thank you for your feedback and questions about the ARM64EC patch. I’m sharing the build system patch for enabling ARM64EC support in FFmpeg. This patch addresses .def file generation for ARM64EC builds on Windows.
In-Lined patch:
diff --git a/compat/windows/makedef b/compat/windows/makedef
index add8222d13..59e300ab61 100755
--- a/compat/windows/makedef
+++ b/compat/windows/makedef
@@ -108,7 +108,12 @@ if [ -n "$NM" ]; then
cut -d' ' -f3 |
sed -e "s/^${prefix}//")
else
- dump=$(dumpbin.exe -linkermember:1 ${libname} |
+ member=1
+ arch=$VSCMD_ARG_TGT_ARCH
+ if [ "${arch^^}" = "ARM64EC" ]; then
+ member=32
+ fi
+ dump=$(dumpbin.exe -linkermember:${member} ${libname} |
sed -e '/public symbols/,$!d' -e '/^ \{1,\}Summary/,$d' -e "s/
\{1,\}${prefix}/ /" -e 's/ \{1,\}/ /g' |
tail -n +2 |
cut -d' ' -f3)
@@ -121,7 +126,7 @@ list=""
for exp in ${regex}; do
list="${list}"'
'$(echo "${dump}" |
- grep "^${exp}" |
+ grep "^${exp}" | awk '!/\$exit_thunk/{print}' |
sed -e 's/^/ /')
done
--
2.50.0.windows.1
For reference, here is the configuration used to build FFmpeg with MSVC for
ARM64EC:
I've also attached the same configuration in ffmpeg-arm64ec-msvc.config for
convenience.
# find_ar_lib resolves to /usr/share/automake-1.16/ar-lib
AR_LIB="$(find_ar_lib)"
AR_CMD="${AR_LIB} lib.exe -machine:arm64ec"
ARCH="arm64"
"${SRC_DIR}/configure" \
--toolchain=msvc \
--target-os=win64 \
--cc=cl.exe \
--cxx=cl.exe \
--extra-cxxflags="-arm64EC" \
--extra-cflags="-arm64EC" \
--extra-ldflags="/machine:arm64ec" \
--as="armasm64.exe -machine ARM64EC" \
--ld=link.exe \
--ar="${AR_CMD}" \
--arch="${ARCH}"
In my setup, this configuration requires the gas-preprocessor.pl patch, as the
build otherwise ends with a “GNU assembler not found” error.
Thanks,
Harish Raja Selvan.
0001-compat-windows-makedef-fix-.def-generation-for-ARM64.patch
Description: 0001-compat-windows-makedef-fix-.def-generation-for-ARM64.patch
0001-ffmpeg-gas-preprocessor-enable-ARM64EC-compilation.patch
Description: 0001-ffmpeg-gas-preprocessor-enable-ARM64EC-compilation.patch
config-arm64ec-msvc.config
Description: config-arm64ec-msvc.config
_______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
