diff options
-rwxr-xr-x | build/make/configure.sh | 7 | ||||
-rwxr-xr-x | build/make/gen_msvs_vcxproj.sh | 40 | ||||
-rw-r--r-- | vp8/common/arm/neon/sixtappredict_neon.c | 4 | ||||
-rw-r--r-- | vp8/common/arm/neon/variance_neon.c | 4 | ||||
-rw-r--r-- | vpx_ports/arm_cpudetect.c | 7 |
5 files changed, 49 insertions, 13 deletions
diff --git a/build/make/configure.sh b/build/make/configure.sh index a65d395de..4c3b05f66 100755 --- a/build/make/configure.sh +++ b/build/make/configure.sh @@ -859,6 +859,13 @@ EOF msvs_arch_dir=arm-msvs disable_feature multithread disable_feature unit_tests + vs_version=${tgt_cc##vs} + if [ $vs_version -ge 12 ]; then + # MSVC 2013 doesn't allow doing plain .exe projects for ARM, + # only "AppContainerApplication" which requires an AppxManifest. + # Therefore disable the examples, just build the library. + disable_feature examples + fi ;; rvct) CC=armcc diff --git a/build/make/gen_msvs_vcxproj.sh b/build/make/gen_msvs_vcxproj.sh index 9dc790629..8529eed24 100755 --- a/build/make/gen_msvs_vcxproj.sh +++ b/build/make/gen_msvs_vcxproj.sh @@ -292,6 +292,18 @@ generate_vcxproj() { tag_content ProjectGuid "{${guid}}" tag_content RootNamespace ${name} tag_content Keyword ManagedCProj + if [ $vs_ver -ge 12 ] && [ "${platforms[0]}" = "ARM" ]; then + tag_content AppContainerApplication true + # The application type can be one of "Windows Store", + # "Windows Phone" or "Windows Phone Silverlight". The + # actual value doesn't matter from the libvpx point of view, + # since a static library built for one works on the others. + # The PlatformToolset field needs to be set in sync with this; + # for Windows Store and Windows Phone Silverlight it should be + # v120 while it should be v120_wp81 if the type is Windows Phone. + tag_content ApplicationType "Windows Store" + tag_content ApplicationTypeRevision 8.1 + fi close_tag PropertyGroup tag Import \ @@ -324,18 +336,10 @@ generate_vcxproj() { fi fi if [ "$vs_ver" = "12" ]; then - if [ "$plat" = "ARM" ]; then - # Setting the wp80 toolchain automatically sets the - # WINAPI_FAMILY define, which is required for building - # code for arm with the windows headers. Alternatively, - # one could add AppContainerApplication=true in the Globals - # section and add PrecompiledHeader=NotUsing and - # CompileAsWinRT=false in ClCompile and SubSystem=Console - # in Link. - tag_content PlatformToolset v120_wp80 - else - tag_content PlatformToolset v120 - fi + # Setting a PlatformToolset indicating windows phone isn't + # enough to build code for arm with MSVC 2013, one strictly + # has to enable AppContainerApplication as well. + tag_content PlatformToolset v120 fi tag_content CharacterSet Unicode if [ "$config" = "Release" ]; then @@ -427,15 +431,25 @@ generate_vcxproj() { if ${werror:-false}; then tag_content TreatWarningAsError true fi + if [ $vs_ver -ge 11 ]; then + # We need to override the defaults for these settings + # if AppContainerApplication is set. + tag_content CompileAsWinRT false + tag_content PrecompiledHeader NotUsing + tag_content SDLCheck false + fi close_tag ClCompile case "$proj_kind" in exe) open_tag Link if [ "$name" != "obj_int_extract" ]; then - tag_content AdditionalDependencies "$curlibs" + tag_content AdditionalDependencies "$curlibs;%(AdditionalDependencies)" tag_content AdditionalLibraryDirectories "$libdirs;%(AdditionalLibraryDirectories)" fi tag_content GenerateDebugInformation true + # Console is the default normally, but if + # AppContainerApplication is set, we need to override it. + tag_content SubSystem Console close_tag Link ;; dll) diff --git a/vp8/common/arm/neon/sixtappredict_neon.c b/vp8/common/arm/neon/sixtappredict_neon.c index 22932e94a..7a4d9e051 100644 --- a/vp8/common/arm/neon/sixtappredict_neon.c +++ b/vp8/common/arm/neon/sixtappredict_neon.c @@ -10,6 +10,10 @@ #include <arm_neon.h> +#ifdef _MSC_VER +#define __builtin_prefetch(x) +#endif + static const int8_t vp8_sub_pel_filters[8][8] = { {0, 0, 128, 0, 0, 0, 0, 0}, /* note that 1/8 pel positionyys are */ {0, -6, 123, 12, -1, 0, 0, 0}, /* just as per alpha -0.5 bicubic */ diff --git a/vp8/common/arm/neon/variance_neon.c b/vp8/common/arm/neon/variance_neon.c index b6b484f5b..afd2dc3d1 100644 --- a/vp8/common/arm/neon/variance_neon.c +++ b/vp8/common/arm/neon/variance_neon.c @@ -10,6 +10,10 @@ #include <arm_neon.h> +#ifdef _MSC_VER +#define __builtin_prefetch(x) +#endif + unsigned int vp8_variance16x16_neon( const unsigned char *src_ptr, int source_stride, diff --git a/vpx_ports/arm_cpudetect.c b/vpx_ports/arm_cpudetect.c index 542ff6786..fa0e030b5 100644 --- a/vpx_ports/arm_cpudetect.c +++ b/vpx_ports/arm_cpudetect.c @@ -12,6 +12,13 @@ #include <string.h> #include "arm.h" +#ifdef WINAPI_FAMILY +#include <winapifamily.h> +#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +#define getenv(x) NULL +#endif +#endif + static int arm_cpu_env_flags(int *flags) { char *env; env = getenv("VPX_SIMD_CAPS"); |