Commit 3067c34c authored by Ghislain MARY's avatar Ghislain MARY Committed by James Zern

Support build with Visual Studio 14.

Change-Id: Id0d7c19857e29b66c652c8cc1ab56b64e4fc0fa3
parent 23591322
...@@ -59,6 +59,7 @@ COMPILING THE APPLICATIONS/LIBRARIES: ...@@ -59,6 +59,7 @@ COMPILING THE APPLICATIONS/LIBRARIES:
armv7-none-rvct armv7-none-rvct
armv7-win32-vs11 armv7-win32-vs11
armv7-win32-vs12 armv7-win32-vs12
armv7-win32-vs14
armv7s-darwin-gcc armv7s-darwin-gcc
mips32-linux-gcc mips32-linux-gcc
mips64-linux-gcc mips64-linux-gcc
...@@ -85,6 +86,7 @@ COMPILING THE APPLICATIONS/LIBRARIES: ...@@ -85,6 +86,7 @@ COMPILING THE APPLICATIONS/LIBRARIES:
x86-win32-vs10 x86-win32-vs10
x86-win32-vs11 x86-win32-vs11
x86-win32-vs12 x86-win32-vs12
x86-win32-vs14
x86_64-android-gcc x86_64-android-gcc
x86_64-darwin9-gcc x86_64-darwin9-gcc
x86_64-darwin10-gcc x86_64-darwin10-gcc
...@@ -102,6 +104,7 @@ COMPILING THE APPLICATIONS/LIBRARIES: ...@@ -102,6 +104,7 @@ COMPILING THE APPLICATIONS/LIBRARIES:
x86_64-win64-vs10 x86_64-win64-vs10
x86_64-win64-vs11 x86_64-win64-vs11
x86_64-win64-vs12 x86_64-win64-vs12
x86_64-win64-vs14
generic-gnu generic-gnu
The generic-gnu target, in conjunction with the CROSS environment variable, The generic-gnu target, in conjunction with the CROSS environment variable,
......
...@@ -19,13 +19,13 @@ show_help() { ...@@ -19,13 +19,13 @@ show_help() {
cat <<EOF cat <<EOF
Usage: ${self_basename} [options] file1 [file2 ...] Usage: ${self_basename} [options] file1 [file2 ...]
This script generates a Visual Studio 2005 solution file from a list of project This script generates a Visual Studio solution file from a list of project
files. files.
Options: Options:
--help Print this message --help Print this message
--out=outfile Redirect output to a file --out=outfile Redirect output to a file
--ver=version Version (7,8,9,10,11) of visual studio to generate for --ver=version Version (7,8,9,10,11,12,14) of visual studio to generate for
--target=isa-os-cc Target specifier --target=isa-os-cc Target specifier
EOF EOF
exit 1 exit 1
...@@ -255,7 +255,7 @@ for opt in "$@"; do ...@@ -255,7 +255,7 @@ for opt in "$@"; do
;; ;;
--ver=*) vs_ver="$optval" --ver=*) vs_ver="$optval"
case $optval in case $optval in
[789]|10|11|12) [789]|10|11|12|14)
;; ;;
*) die Unrecognized Visual Studio Version in $opt *) die Unrecognized Visual Studio Version in $opt
;; ;;
...@@ -300,12 +300,15 @@ case "${vs_ver:-8}" in ...@@ -300,12 +300,15 @@ case "${vs_ver:-8}" in
12) sln_vers="12.00" 12) sln_vers="12.00"
sln_vers_str="Visual Studio 2013" sln_vers_str="Visual Studio 2013"
;; ;;
14) sln_vers="14.00"
sln_vers_str="Visual Studio 2015"
;;
esac esac
case "${vs_ver:-8}" in case "${vs_ver:-8}" in
[789]) [789])
sfx=vcproj sfx=vcproj
;; ;;
10|11|12) 10|11|12|14)
sfx=vcxproj sfx=vcxproj
;; ;;
esac esac
......
...@@ -34,7 +34,7 @@ Options: ...@@ -34,7 +34,7 @@ Options:
--name=project_name Name of the project (required) --name=project_name Name of the project (required)
--proj-guid=GUID GUID to use for the project --proj-guid=GUID GUID to use for the project
--module-def=filename File containing export definitions (for DLLs) --module-def=filename File containing export definitions (for DLLs)
--ver=version Version (10,11,12) of visual studio to generate for --ver=version Version (10,11,12,14) of visual studio to generate for
--src-path-bare=dir Path to root of source tree --src-path-bare=dir Path to root of source tree
-Ipath/to/include Additional include directories -Ipath/to/include Additional include directories
-DFLAG[=value] Preprocessor macros to define -DFLAG[=value] Preprocessor macros to define
...@@ -168,7 +168,7 @@ for opt in "$@"; do ...@@ -168,7 +168,7 @@ for opt in "$@"; do
--ver=*) --ver=*)
vs_ver="$optval" vs_ver="$optval"
case "$optval" in case "$optval" in
10|11|12) 10|11|12|14)
;; ;;
*) die Unrecognized Visual Studio Version in $opt *) die Unrecognized Visual Studio Version in $opt
;; ;;
...@@ -218,7 +218,7 @@ guid=${guid:-`generate_uuid`} ...@@ -218,7 +218,7 @@ guid=${guid:-`generate_uuid`}
asm_use_custom_step=false asm_use_custom_step=false
uses_asm=${uses_asm:-false} uses_asm=${uses_asm:-false}
case "${vs_ver:-11}" in case "${vs_ver:-11}" in
10|11|12) 10|11|12|14)
asm_use_custom_step=$uses_asm asm_use_custom_step=$uses_asm
;; ;;
esac esac
...@@ -344,6 +344,9 @@ generate_vcxproj() { ...@@ -344,6 +344,9 @@ generate_vcxproj() {
# has to enable AppContainerApplication as well. # has to enable AppContainerApplication as well.
tag_content PlatformToolset v120 tag_content PlatformToolset v120
fi fi
if [ "$vs_ver" = "14" ]; then
tag_content PlatformToolset v140
fi
tag_content CharacterSet Unicode tag_content CharacterSet Unicode
if [ "$config" = "Release" ]; then if [ "$config" = "Release" ]; then
tag_content WholeProgramOptimization true tag_content WholeProgramOptimization true
......
...@@ -106,6 +106,7 @@ all_platforms="${all_platforms} armv7-linux-gcc" #neon Cortex-A8 ...@@ -106,6 +106,7 @@ all_platforms="${all_platforms} armv7-linux-gcc" #neon Cortex-A8
all_platforms="${all_platforms} armv7-none-rvct" #neon Cortex-A8 all_platforms="${all_platforms} armv7-none-rvct" #neon Cortex-A8
all_platforms="${all_platforms} armv7-win32-vs11" all_platforms="${all_platforms} armv7-win32-vs11"
all_platforms="${all_platforms} armv7-win32-vs12" all_platforms="${all_platforms} armv7-win32-vs12"
all_platforms="${all_platforms} armv7-win32-vs14"
all_platforms="${all_platforms} armv7s-darwin-gcc" all_platforms="${all_platforms} armv7s-darwin-gcc"
all_platforms="${all_platforms} mips32-linux-gcc" all_platforms="${all_platforms} mips32-linux-gcc"
all_platforms="${all_platforms} mips64-linux-gcc" all_platforms="${all_platforms} mips64-linux-gcc"
...@@ -132,6 +133,7 @@ all_platforms="${all_platforms} x86-win32-vs9" ...@@ -132,6 +133,7 @@ all_platforms="${all_platforms} x86-win32-vs9"
all_platforms="${all_platforms} x86-win32-vs10" all_platforms="${all_platforms} x86-win32-vs10"
all_platforms="${all_platforms} x86-win32-vs11" all_platforms="${all_platforms} x86-win32-vs11"
all_platforms="${all_platforms} x86-win32-vs12" all_platforms="${all_platforms} x86-win32-vs12"
all_platforms="${all_platforms} x86-win32-vs14"
all_platforms="${all_platforms} x86_64-android-gcc" all_platforms="${all_platforms} x86_64-android-gcc"
all_platforms="${all_platforms} x86_64-darwin9-gcc" all_platforms="${all_platforms} x86_64-darwin9-gcc"
all_platforms="${all_platforms} x86_64-darwin10-gcc" all_platforms="${all_platforms} x86_64-darwin10-gcc"
...@@ -149,6 +151,7 @@ all_platforms="${all_platforms} x86_64-win64-vs9" ...@@ -149,6 +151,7 @@ all_platforms="${all_platforms} x86_64-win64-vs9"
all_platforms="${all_platforms} x86_64-win64-vs10" all_platforms="${all_platforms} x86_64-win64-vs10"
all_platforms="${all_platforms} x86_64-win64-vs11" all_platforms="${all_platforms} x86_64-win64-vs11"
all_platforms="${all_platforms} x86_64-win64-vs12" all_platforms="${all_platforms} x86_64-win64-vs12"
all_platforms="${all_platforms} x86_64-win64-vs14"
all_platforms="${all_platforms} generic-gnu" all_platforms="${all_platforms} generic-gnu"
# all_targets is a list of all targets that can be configured # all_targets is a list of all targets that can be configured
...@@ -639,7 +642,7 @@ process_toolchain() { ...@@ -639,7 +642,7 @@ process_toolchain() {
VCPROJ_SFX=vcproj VCPROJ_SFX=vcproj
gen_vcproj_cmd=${source_path}/build/make/gen_msvs_proj.sh gen_vcproj_cmd=${source_path}/build/make/gen_msvs_proj.sh
;; ;;
10|11|12) 10|11|12|14)
VCPROJ_SFX=vcxproj VCPROJ_SFX=vcxproj
gen_vcproj_cmd=${source_path}/build/make/gen_msvs_vcxproj.sh gen_vcproj_cmd=${source_path}/build/make/gen_msvs_vcxproj.sh
enabled werror && gen_vcproj_cmd="${gen_vcproj_cmd} --enable-werror" enabled werror && gen_vcproj_cmd="${gen_vcproj_cmd} --enable-werror"
......
...@@ -45,6 +45,10 @@ static int get_cpu_count() ...@@ -45,6 +45,10 @@ static int get_cpu_count()
#endif #endif
#elif defined(_WIN32) #elif defined(_WIN32)
{ {
#if _WIN32_WINNT >= 0x0501
SYSTEM_INFO sysinfo;
GetNativeSystemInfo(&sysinfo);
#else
PGNSI pGNSI; PGNSI pGNSI;
SYSTEM_INFO sysinfo; SYSTEM_INFO sysinfo;
...@@ -57,6 +61,7 @@ static int get_cpu_count() ...@@ -57,6 +61,7 @@ static int get_cpu_count()
pGNSI(&sysinfo); pGNSI(&sysinfo);
else else
GetSystemInfo(&sysinfo); GetSystemInfo(&sysinfo);
#endif
core_count = sysinfo.dwNumberOfProcessors; core_count = sysinfo.dwNumberOfProcessors;
} }
......
...@@ -136,6 +136,13 @@ static INLINE uint64_t xgetbv(void) { ...@@ -136,6 +136,13 @@ static INLINE uint64_t xgetbv(void) {
#define xgetbv() 0U // no AVX for older x64 or unrecognized toolchains. #define xgetbv() 0U // no AVX for older x64 or unrecognized toolchains.
#endif #endif
#if defined(_MSC_VER)
#include <windows.h>
#if WINAPI_FAMILY_PARTITION(WINAPI_FAMILY_APP)
#define getenv(x) NULL
#endif
#endif
#define HAS_MMX 0x01 #define HAS_MMX 0x01
#define HAS_SSE 0x02 #define HAS_SSE 0x02
#define HAS_SSE2 0x04 #define HAS_SSE2 0x04
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment