com php-src: add config option to target codegen architectures: win32/build/config.w32 win32/build/config.w32.phpize.in win32/build/confutils.js

From: Date: Wed, 03 Dec 2014 18:20:36 +0000
Subject: com php-src: add config option to target codegen architectures: win32/build/config.w32 win32/build/config.w32.phpize.in win32/build/confutils.js
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-83499@lists.php.net to get a copy of this message
Commit: 00ac1ae53cc9b14c925250eefa80e448f7cccab0 Author: Anatol Belski <ab@php.net> Tue, 2 Dec 2014 15:59:38 +0100 Parents: 463c615dfefeef58dd7cd5e619590cb13d81d227 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=00ac1ae53cc9b14c925250eefa80e448f7cccab0 Log: add config option to target codegen architectures Changed paths: M win32/build/config.w32 M win32/build/config.w32.phpize.in M win32/build/confutils.js Diff: diff --git a/win32/build/config.w32 b/win32/build/config.w32 index 89e6761..574d8e2 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -248,3 +248,6 @@ if (CLANG_TOOLSET) { } } +ARG_WITH("codegen-arch", "Architecture for code generation: ia32, sse, sse2, avx, avx2", "no"); +toolset_setup_codegen_arch(); + diff --git a/win32/build/config.w32.phpize.in b/win32/build/config.w32.phpize.in index a340af0..d68a21f 100644 --- a/win32/build/config.w32.phpize.in +++ b/win32/build/config.w32.phpize.in @@ -126,3 +126,7 @@ DEFINE('SNAPSHOT_TEMPLATE', PHP_SNAPSHOT_TEMPLATE); AC_DEFINE("PHP_DIR", PHP_DIR); DEFINE("PHP_DIR", PHP_DIR); + +ARG_WITH("codegen-arch", "Architecture for code generation", "no"); +toolset_setup_codegen_arch(); + diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 45db550..8a4cb93 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -2544,6 +2544,20 @@ function toolset_setup_arch() DEFINE("PHP_ARCHITECTURE", X64 ? 'x64' : 'x86'); } +function toolset_setup_codegen_arch() +{ + if("no" == PHP_CODEGEN_ARCH) { + return; + } + + if (VS_TOOLSET) { + var arc = PHP_CODEGEN_ARCH.toUpperCase(); + + if ("AVX2" == arc || "AVX" == arc || "SSE2" == arc || "SSE" == arc || "IA32" == arc) { + ADD_FLAG("CFLAGS", "/arch:" + arc); + } + } +} function toolset_setup_linker() {

« previous php.cvs (#83499) next »