From 898a56eb273c72adde09863031244ce63561fcb9 Mon Sep 17 00:00:00 2001 From: Andrey Churbanov Date: Thu, 29 Jan 2015 15:37:15 +0000 Subject: [PATCH] adding the jobs variable for parallel build llvm-svn: 227447 --- openmp/runtime/Makefile | 9 +++++---- openmp/runtime/README.txt | 4 ++++ openmp/runtime/tools/common.inc | 3 +++ openmp/runtime/tools/src/common-rules.mk | 4 ++++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/openmp/runtime/Makefile b/openmp/runtime/Makefile index b1697e4..16d71ab 100644 --- a/openmp/runtime/Makefile +++ b/openmp/runtime/Makefile @@ -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) diff --git a/openmp/runtime/README.txt b/openmp/runtime/README.txt index 1151000..a5cf6e4 100644 --- a/openmp/runtime/README.txt +++ b/openmp/runtime/README.txt @@ -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 =. For example, if you want to build with gcc instead of icc, type: diff --git a/openmp/runtime/tools/common.inc b/openmp/runtime/tools/common.inc index e80b68f..db6d2a9 100644 --- a/openmp/runtime/tools/common.inc +++ b/openmp/runtime/tools/common.inc @@ -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) diff --git a/openmp/runtime/tools/src/common-rules.mk b/openmp/runtime/tools/src/common-rules.mk index a63aa0b..44f97c2 100644 --- a/openmp/runtime/tools/src/common-rules.mk +++ b/openmp/runtime/tools/src/common-rules.mk @@ -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" -- 2.7.4