summaryrefslogtreecommitdiffstats
path: root/src/core/gyp_run.pro
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-03-07 14:49:10 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-07 18:19:36 +0100
commit7795807dc6eb757f32971d12fe7c9514350b4636 (patch)
treed5037eedbfd8e7c92f9be82abb3b3e4e6df77bfe /src/core/gyp_run.pro
parent7e78765a0ced3ee5dd831d47925270037e39feb2 (diff)
Fix debug_and_release builds
This makes sure that gyp_run.pro follows the same behavior as core_module.pro and that ninja is run for each config, in the appropriate directory. A special .NOTPARALLEL make fake target is added to avoid running ninja for both configurations in parallel (this would cause build failures). This target will be ignored by nmake, but might cause issues if trying to build with jom. Change-Id: Ibaa5f6aa4972cb24c83cc7a63e496938a5c16a3f Reviewed-by: Zoltan Arvai <zarvai@inf.u-szeged.hu> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'src/core/gyp_run.pro')
-rw-r--r--src/core/gyp_run.pro41
1 files changed, 27 insertions, 14 deletions
diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro
index 5ef289b1b..d1867ada9 100644
--- a/src/core/gyp_run.pro
+++ b/src/core/gyp_run.pro
@@ -4,6 +4,13 @@
TEMPLATE = aux
+# Copy this logic from qt_module.prf so that ninja can run according
+# to the same rules as the final module linking in core_module.pro.
+!host_build:if(win32|mac):!macx-xcode {
+ contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
+ contains(QT_CONFIG, build_all):CONFIG += build_all
+}
+
GYP_ARGS = "-D qt_cross_compile=0"
cross_compile {
GYP_ARGS = "-D qt_cross_compile=1 -D os_posix=1"
@@ -59,25 +66,31 @@ cross_compile {
}
win32 {
-# Libvpx build needs additional search path on Windows.
-git_chromium_src_dir = $$system("git config qtwebengine.chromiumsrcdir")
-GYP_ARGS += "-D qtwe_chromium_obj_dir=\"$$OUT_PWD/$$getConfigDir()/obj/$$git_chromium_src_dir\""
+ # Libvpx build needs additional search path on Windows.
+ git_chromium_src_dir = $$system("git config qtwebengine.chromiumsrcdir")
+ GYP_ARGS += "-D qtwe_chromium_obj_dir=\"$$OUT_PWD/$$getConfigDir()/obj/$$git_chromium_src_dir\""
-# Use path from environment for perl, bison and gperf instead of values set in WebKit's core.gypi.
-GYP_ARGS += "-D perl_exe=\"perl.exe\" -D bison_exe=\"bison.exe\" -D gperf_exe=\"gperf.exe\""
+ # Use path from environment for perl, bison and gperf instead of values set in WebKit's core.gypi.
+ GYP_ARGS += "-D perl_exe=\"perl.exe\" -D bison_exe=\"bison.exe\" -D gperf_exe=\"gperf.exe\""
}
!build_pass {
- message("Running gyp_qtwebengine \"$$OUT_PWD\" $${GYP_ARGS}...")
- !system("python $$QTWEBENGINE_ROOT/tools/buildscripts/gyp_qtwebengine \"$$OUT_PWD\" $${GYP_ARGS}"): error("-- running gyp_qtwebengine failed --")
+ message("Running gyp_qtwebengine \"$$OUT_PWD\" $${GYP_ARGS}...")
+ !system("python $$QTWEBENGINE_ROOT/tools/buildscripts/gyp_qtwebengine \"$$OUT_PWD\" $${GYP_ARGS}"): error("-- running gyp_qtwebengine failed --")
}
-ninja.target = invoke_ninja
-ninja.commands = $$findOrBuildNinja() \$\(NINJAFLAGS\) -C "$$OUT_PWD/$$getConfigDir()"
-QMAKE_EXTRA_TARGETS += ninja
+build_pass|!debug_and_release {
+ ninja.target = invoke_ninja
+ ninja.commands = $$findOrBuildNinja() \$\(NINJAFLAGS\) -C "$$OUT_PWD/$$getConfigDir()"
+ QMAKE_EXTRA_TARGETS += ninja
-build_pass:build_all:default_target.target = all
-else: default_target.target = first
-default_target.depends = ninja
+ build_pass:build_all: default_target.target = all
+ else: default_target.target = first
+ default_target.depends = ninja
-QMAKE_EXTRA_TARGETS += default_target
+ QMAKE_EXTRA_TARGETS += default_target
+} else {
+ # Special GNU make target for the meta Makefile that ensures that our debug and release Makefiles won't both run ninja in parallel.
+ notParallel.target = .NOTPARALLEL
+ QMAKE_EXTRA_TARGETS += notParallel
+}