shithub: libvpx

Download patch

ref: 553c68dca1dd17590dbefde732191700cb75aade
parent: 7d349b2cab069c9305240ae509b92de11d4e8f3b
parent: daefbf2a6f5a2a9334355845396fa5f2fdccbaa5
author: Johann Koenig <johannkoenig@google.com>
date: Wed Oct 30 09:07:55 EDT 2019

Merge changes I7dd2b487,I6db5b053

* changes:
  support visual studio 2019 (vs16)
  remove old visual studio remnants

--- a/README
+++ b/README
@@ -100,6 +100,7 @@
     x86-win32-gcc
     x86-win32-vs14
     x86-win32-vs15
+    x86-win32-vs16
     x86_64-android-gcc
     x86_64-darwin9-gcc
     x86_64-darwin10-gcc
@@ -118,6 +119,7 @@
     x86_64-win64-gcc
     x86_64-win64-vs14
     x86_64-win64-vs15
+    x86_64-win64-vs16
     generic-gnu
 
   The generic-gnu target, in conjunction with the CROSS environment variable,
--- a/build/make/gen_msvs_sln.sh
+++ b/build/make/gen_msvs_sln.sh
@@ -25,7 +25,7 @@
 Options:
     --help                      Print this message
     --out=outfile               Redirect output to a file
-    --ver=version               Version (7,8,9,10,11,12,14,15) of visual studio to generate for
+    --ver=version               Version (14-16) of visual studio to generate for
     --target=isa-os-cc          Target specifier
 EOF
     exit 1
@@ -213,13 +213,14 @@
     ;;
     --dep=*) eval "${optval%%:*}_deps=\"\${${optval%%:*}_deps} ${optval##*:}\""
     ;;
-    --ver=*) vs_ver="$optval"
-             case $optval in
-             10|11|12|14|15)
-             ;;
-             *) die Unrecognized Visual Studio Version in $opt
-             ;;
-             esac
+    --ver=*)
+      vs_ver="$optval"
+      case $optval in
+        14) vs_year=2015 ;;
+        15) vs_year=2017 ;;
+        16) vs_year=2019 ;;
+        *) die Unrecognized Visual Studio Version in $opt ;;
+      esac
     ;;
     --target=*) target="${optval}"
     ;;
@@ -230,21 +231,11 @@
 done
 outfile=${outfile:-/dev/stdout}
 mkoutfile=${mkoutfile:-/dev/stdout}
-case "${vs_ver:-10}" in
-    10) sln_vers="11.00"
-       sln_vers_str="Visual Studio 2010"
-    ;;
-    11) sln_vers="12.00"
-       sln_vers_str="Visual Studio 2012"
-    ;;
-    12) sln_vers="12.00"
-       sln_vers_str="Visual Studio 2013"
-    ;;
-    14) sln_vers="12.00"
-       sln_vers_str="Visual Studio 2015"
-    ;;
-    15) sln_vers="12.00"
-       sln_vers_str="Visual Studio 2017"
+case "${vs_ver}" in
+    1[4-6])
+      # VS has used Format Version 12.00 continuously since vs11.
+      sln_vers="12.00"
+      sln_vers_str="Visual Studio ${vs_year}"
     ;;
 esac
 sfx=vcxproj
--- a/build/make/gen_msvs_vcxproj.sh
+++ b/build/make/gen_msvs_vcxproj.sh
@@ -34,7 +34,7 @@
     --name=project_name         Name of the project (required)
     --proj-guid=GUID            GUID to use for the project
     --module-def=filename       File containing export definitions (for DLLs)
-    --ver=version               Version (10,11,12,14,15) of visual studio to generate for
+    --ver=version               Version (14-16) of visual studio to generate for
     --src-path-bare=dir         Path to root of source tree
     -Ipath/to/include           Additional include directories
     -DFLAG[=value]              Preprocessor macros to define
@@ -82,7 +82,7 @@
                        | sed -e "s,$src_path_bare,," \
                              -e 's/^[\./]\+//g' -e 's,[:/ ],_,g')
 
-                if ([ "$pat" == "asm" ] || [ "$pat" == "s" ] || [ "$pat" == "S" ]) && $asm_use_custom_step; then
+                if ([ "$pat" == "asm" ] || [ "$pat" == "s" ] || [ "$pat" == "S" ]) && $uses_asm; then
                     # Avoid object file name collisions, i.e. vpx_config.c and
                     # vpx_config.asm produce the same object file without
                     # this additional suffix.
@@ -168,7 +168,7 @@
         --ver=*)
             vs_ver="$optval"
             case "$optval" in
-                10|11|12|14|15)
+                1[4-6])
                 ;;
                 *) die Unrecognized Visual Studio Version in $opt
                 ;;
@@ -215,13 +215,7 @@
 
 outfile=${outfile:-/dev/stdout}
 guid=${guid:-`generate_uuid`}
-asm_use_custom_step=false
 uses_asm=${uses_asm:-false}
-case "${vs_ver:-11}" in
-    10|11|12|14|15)
-       asm_use_custom_step=$uses_asm
-    ;;
-esac
 
 [ -n "$name" ] || die "Project name (--name) must be specified!"
 [ -n "$target" ] || die "Target (--target) must be specified!"
@@ -339,31 +333,14 @@
             else
                 tag_content ConfigurationType StaticLibrary
             fi
-            if [ "$vs_ver" = "11" ]; 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 v110_wp80
-                else
-                    tag_content PlatformToolset v110
-                fi
-            fi
-            if [ "$vs_ver" = "12" ]; then
-                # 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
             if [ "$vs_ver" = "14" ]; then
                 tag_content PlatformToolset v140
             fi
             if [ "$vs_ver" = "15" ]; then
                 tag_content PlatformToolset v141
+            fi
+            if [ "$vs_ver" = "16" ]; then
+                tag_content PlatformToolset v142
             fi
             tag_content CharacterSet Unicode
             if [ "$config" = "Release" ]; then
--- a/configure
+++ b/configure
@@ -137,6 +137,7 @@
 all_platforms="${all_platforms} x86-win32-gcc"
 all_platforms="${all_platforms} x86-win32-vs14"
 all_platforms="${all_platforms} x86-win32-vs15"
+all_platforms="${all_platforms} x86-win32-vs16"
 all_platforms="${all_platforms} x86_64-android-gcc"
 all_platforms="${all_platforms} x86_64-darwin9-gcc"
 all_platforms="${all_platforms} x86_64-darwin10-gcc"
@@ -155,6 +156,7 @@
 all_platforms="${all_platforms} x86_64-win64-gcc"
 all_platforms="${all_platforms} x86_64-win64-vs14"
 all_platforms="${all_platforms} x86_64-win64-vs15"
+all_platforms="${all_platforms} x86_64-win64-vs16"
 all_platforms="${all_platforms} generic-gnu"
 
 # all_targets is a list of all targets that can be configured