cmp "$1" ${TMP_H} >/dev/null 2>&1 || mv ${TMP_H} "$1"
}
+write_win_arm64_neon_h_workaround() {
+ print_webm_license ${TMP_H} "/*" " */"
+ cat >> ${TMP_H} << EOF
+/* This file automatically generated by configure. Do not edit! */
+#ifndef VPX_WIN_ARM_NEON_H_WORKAROUND
+#define VPX_WIN_ARM_NEON_H_WORKAROUND
+/* The Windows SDK has arm_neon.h, but unlike on other platforms it is
+ * ARM32-only. ARM64 NEON support is provided by arm64_neon.h, a proper
+ * superset of arm_neon.h. Work around this by providing a more local
+ * arm_neon.h that simply #includes arm64_neon.h.
+ */
+#include <arm64_neon.h>
+#endif /* VPX_WIN_ARM_NEON_H_WORKAROUND */
+EOF
+ mkdir -p `dirname "$1"`
+ cmp "$1" ${TMP_H} >/dev/null 2>&1 || mv ${TMP_H} "$1"
+}
+
process_common_cmdline() {
for opt in "$@"; do
optval="${opt#*=}"
disable_feature examples
disable_feature tools
fi
- #else
+ else
# Windows 10 on ARM, on the other hand, has full Windows SDK support
# for building Win32 ARM64 applications in addition to ARM64
# Windows Store apps. It is the only 64-bit ARM ABI that
# Windows supports, so it is the default definition of 'win64'.
# ARM64 build support officially shipped in Visual Studio 15.9.0.
+
+ # Because the ARM64 Windows SDK's arm_neon.h is ARM32-specific
+ # while LLVM's is not, probe its validity.
+ if enabled neon; then
+ if [ -n "${CC}" ]; then
+ check_header arm_neon.h || check_header arm64_neon.h && \
+ enable_feature win_arm64_neon_h_workaround
+ else
+ # If a probe is not possible, assume this is the pure Windows
+ # SDK and so the workaround is necessary.
+ enable_feature win_arm64_neon_h_workaround
+ fi
+ fi
fi
;;
rvct)
enabled child || write_common_config_banner
write_common_target_config_h ${BUILD_PFX}vpx_config.h
write_common_config_targets
+ enabled win_arm64_neon_h_workaround && write_win_arm64_neon_h_workaround ${BUILD_PFX}arm_neon.h
# Calculate the default distribution name, based on the enabled features
cf=""