adding the jobs variable for parallel build
authorAndrey Churbanov <Andrey.Churbanov@intel.com>
Thu, 29 Jan 2015 15:37:15 +0000 (15:37 +0000)
committerAndrey Churbanov <Andrey.Churbanov@intel.com>
Thu, 29 Jan 2015 15:37:15 +0000 (15:37 +0000)
llvm-svn: 227447

openmp/runtime/Makefile
openmp/runtime/README.txt
openmp/runtime/tools/common.inc
openmp/runtime/tools/src/common-rules.mk

index b1697e4..16d71ab 100644 (file)
@@ -18,12 +18,12 @@ default: omp
 all: omp stubs
 
 omp: info mkdir
-       @echo $(omp_root)/tools/build.pl $(build_args) --arch=$(arch) --mode=$(mode) lib inc common
-       $(omp_root)/tools/build.pl $(build_args) --arch=$(arch) --mode=$(mode) lib inc common
+       @echo $(omp_root)/tools/build.pl $(build_args) --arch=$(arch) --mode=$(mode) lib inc common -- -j$(jobs)
+       $(omp_root)/tools/build.pl $(build_args) --arch=$(arch) --mode=$(mode) lib inc common -- -j$(jobs)
 
 stubs: mkdir
-       @echo $(omp_root)/tools/build.pl $(build_args) --arch=$(arch) --mode=$(mode) --stubs lib inc common 
-       $(omp_root)/tools/build.pl $(build_args) --arch=$(arch) --mode=$(mode) --stubs lib inc common
+       @echo $(omp_root)/tools/build.pl $(build_args) --arch=$(arch) --mode=$(mode) --stubs lib inc common -- -j$(jobs)
+       $(omp_root)/tools/build.pl $(build_args) --arch=$(arch) --mode=$(mode) --stubs lib inc common -- -j$(jobs)
 
 .PHONY: clean info
 
@@ -45,4 +45,5 @@ endif
        @echo compiler=$(compiler)      
        @echo mic=$(mic)
        @echo mode=$(mode)
+       @echo jobs=$(jobs)
 
index 1151000..a5cf6e4 100644 (file)
@@ -65,6 +65,10 @@ compiler:    Which compiler to use for the build.  Defaults to "icc"
 
 mode:        Library mode: default is "release".  Also supports "debug".
 
+jobs:        The number of parallel jobs for the underlying call to make.
+         This value is sent as the parameter to the -j flag for make.
+         This value defaults to "1", but can be set to any positive integer.
+
 To use any of the options above, simple add <option_name>=<value>.  For 
 example, if you want to build with gcc instead of icc, type:
 
index e80b68f..db6d2a9 100644 (file)
@@ -101,6 +101,9 @@ See the Tools tab at http://software.intel.com/mic-developer)
     endif
 endif
 
+# number of parallel build jobs
+jobs?=1
+
 export BUILD_COMPILER := $(compiler)
 
 
index a63aa0b..44f97c2 100644 (file)
@@ -158,6 +158,10 @@ expand-vars = $(perl) $(tools_dir)expand-vars.pl --strict $(ev-flags) $< $@
             endif
         endif
 
+ifneq "$(pdb_file)" ""
+$(pdb_file) : $(lib_file)
+endif
+
 %.dbg : %$(dll) .rebuild
        $(target)
         ifeq "$(arch)" "mic"