changeset 5407:febab3a8f203

8007446: Add /MP to cl.exe speeds up windows builds of OpenJDK. Reviewed-by: sla, ctornqvi
author erikj
date Fri, 04 Oct 2013 12:45:39 +0200
parents 2720ab7a0d70
children 763705f0fec3
files make/windows/makefiles/compile.make make/windows/makefiles/sa.make
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/make/windows/makefiles/compile.make	Fri Oct 04 21:00:43 2013 -0700
+++ b/make/windows/makefiles/compile.make	Fri Oct 04 12:45:39 2013 +0200
@@ -44,6 +44,7 @@
 #   /GS       Inserts security stack checks in some functions (VS2005 default)
 #   /Oi       Use intrinsics (in /O2)
 #   /Od       Disable all optimizations
+#   /MP       Use multiple cores for compilation
 #
 # NOTE: Normally following any of the above with a '-' will turn off that flag
 #
@@ -206,6 +207,7 @@
 DEBUG_OPT_OPTION     = /Od
 GX_OPTION = /EHsc
 LD_FLAGS = /manifest $(LD_FLAGS)
+MP_FLAG = /MP
 # Manifest Tool - used in VS2005 and later to adjust manifests stored
 # as resources inside build artifacts.
 !if "x$(MT)" == "x"
@@ -219,6 +221,7 @@
 DEBUG_OPT_OPTION     = /Od
 GX_OPTION = /EHsc
 LD_FLAGS = /manifest $(LD_FLAGS)
+MP_FLAG = /MP
 # Manifest Tool - used in VS2005 and later to adjust manifests stored
 # as resources inside build artifacts.
 !if "x$(MT)" == "x"
@@ -235,6 +238,7 @@
 DEBUG_OPT_OPTION     = /Od
 GX_OPTION = /EHsc
 LD_FLAGS = /manifest $(LD_FLAGS)
+MP_FLAG = /MP
 # Manifest Tool - used in VS2005 and later to adjust manifests stored
 # as resources inside build artifacts.
 !if "x$(MT)" == "x"
@@ -245,6 +249,8 @@
 !endif
 !endif
 
+CXX_FLAGS = $(CXX_FLAGS) $(MP_FLAG)
+
 # If NO_OPTIMIZATIONS is defined in the environment, turn everything off
 !ifdef NO_OPTIMIZATIONS
 PRODUCT_OPT_OPTION   = $(DEBUG_OPT_OPTION)
--- a/make/windows/makefiles/sa.make	Fri Oct 04 21:00:43 2013 -0700
+++ b/make/windows/makefiles/sa.make	Fri Oct 04 12:45:39 2013 +0200
@@ -108,6 +108,8 @@
 SA_LFLAGS = $(SA_LFLAGS) -map -debug
 !endif
 
+SA_CFLAGS = $(SA_CFLAGS) $(MP_FLAG)
+
 # Note that we do not keep sawindbj.obj around as it would then
 # get included in the dumpbin command in build_vm_def.sh