From: Anatol Belski Date: Wed, 12 Nov 2014 10:14:56 +0000 (+0100) Subject: generalize arch setup X-Git-Tag: PRE_NATIVE_TLS_MERGE~130^2~20^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=79c61c71c2a75e8fd41e5994f3ee774070d02bdd;p=php generalize arch setup --- diff --git a/win32/build/config.w32 b/win32/build/config.w32 index 65c273a5bc..748631ddde 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -14,13 +14,7 @@ toolset_setup_compiler(); // do we use x64 or 80x86 version of compiler? X64 = toolset_is_64(); -if (X64) { - STDOUT.WriteLine(" Detected 64-bit compiler"); -} else { - STDOUT.WriteLine(" Detected 32-bit compiler"); -} -AC_DEFINE('ARCHITECTURE', X64 ? 'x64' : 'x86', "Detected compiler architecture"); -DEFINE("PHP_ARCHITECTURE", X64 ? 'x64' : 'x86'); +toolset_setup_arch(); toolset_setup_linker(); toolset_setup_project_tools(); diff --git a/win32/build/config.w32.phpize.in b/win32/build/config.w32.phpize.in index 8b831f0b10..6a33dc2036 100644 --- a/win32/build/config.w32.phpize.in +++ b/win32/build/config.w32.phpize.in @@ -14,13 +14,7 @@ toolset_setup_compiler(); // do we use x64 or 80x86 version of compiler? X64 = toolset_is_64(); -if (X64) { - STDOUT.WriteLine(" Detected 64-bit compiler"); -} else { - STDOUT.WriteLine(" Detected 32-bit compiler"); -} -AC_DEFINE('ARCHITECTURE', X64 ? 'x64' : 'x86', "Detected compiler architecture"); -DEFINE("PHP_ARCHITECTURE", X64 ? 'x64' : 'x86'); +toolset_setup_arch(); toolset_setup_linker(); toolset_setup_project_tools(); diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 1aac59ea5f..94068bfa9d 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -2502,6 +2502,17 @@ function toolset_is_64() ERROR("Unsupported toolset"); } +function toolset_setup_arch() +{ + if (X64) { + STDOUT.WriteLine(" Detected 64-bit compiler"); + } else { + STDOUT.WriteLine(" Detected 32-bit compiler"); + } + AC_DEFINE('ARCHITECTURE', X64 ? 'x64' : 'x86', "Detected compiler architecture"); + DEFINE("PHP_ARCHITECTURE", X64 ? 'x64' : 'x86'); +} + function toolset_setup_linker() {