From 892efcfc3dcc4d869d00e3628c3aa5116fe2c7ab Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Wed, 8 Oct 2014 10:59:15 +0200 Subject: [PATCH] fix /mp usage for VC++ --- win32/build/config.w32 | 3 +++ win32/build/confutils.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/win32/build/config.w32 b/win32/build/config.w32 index f00584eaa9..358ff4e0ce 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -167,13 +167,16 @@ if (VCVERS >= 1400) { } ARG_WITH('mp', 'Tell Visual Studio use up to [n,auto,disable] processes for compilation', 'auto'); +var PHP_MP_DISABLED = true; if (VCVERS >= 1500 && PHP_MP != 'disable') { // no from disable-all if(PHP_MP == 'auto' || PHP_MP == 'no') { ADD_FLAG('CFLAGS', ' /MP '); + PHP_MP_DISABLED = false; } else { if(parseInt(PHP_MP) != 0) { ADD_FLAG('CFLAGS', ' /MP'+ PHP_MP +' '); + PHP_MP_DISABLED = false; } else { STDOUT.WriteLine('WARNING: Invalid argument for MP: ' + PHP_MP); } diff --git a/win32/build/confutils.js b/win32/build/confutils.js index ae668fee26..b6d59005e9 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -1429,7 +1429,7 @@ function ADD_SOURCES(dir, file_list, target, obj_dir) obj = src.replace(re, ".obj"); tv += " " + sub_build + obj; - if (!MODE_PHPIZE && PHP_ONE_SHOT == "yes") { + if (!MODE_PHPIZE && !PHP_MP_DISABLED) { if (i > 0) { objs_line += " " + sub_build + obj; srcs_line += " " + dir + "\\" + src; @@ -1448,7 +1448,7 @@ function ADD_SOURCES(dir, file_list, target, obj_dir) } } - if (!MODE_PHPIZE && PHP_ONE_SHOT == "yes") { + if (!MODE_PHPIZE && !PHP_MP_DISABLED) { MFO.WriteLine(objs_line + ": " + srcs_line); MFO.WriteLine("\t$(CC) $(" + flags + ") $(CFLAGS) /Fo" + sub_build + " $(" + bd_flags_name + ") /c " + srcs_line); } -- 2.40.0