summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2017-02-03 16:13:50 +0100
committerMichal Klocek <michal.klocek@qt.io>2017-02-06 19:32:46 +0000
commitabaede7601ea7426242dc29deb964ab3dd543c0a (patch)
treef90e83c63f80c8ce58c5c75d0a52d3518e53477c /tools
parent79ad6bad373bb5151ba7c3410609a9fee009be58 (diff)
Refactor release and debug handling
Fix release and debug builds. Refactor ninja and gn builds as a sub projects, these are only build as release. Call core_generator and gn_run separately for debug and release builds. Change-Id: I638023214cdc98a5101d190486452cc4a1229486 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmake/mkspecs/features/functions.prf35
-rw-r--r--tools/qmake/mkspecs/features/gn_generator.prf2
2 files changed, 9 insertions, 28 deletions
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index f3c2eb905..35607986d 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -380,19 +380,6 @@ defineReplace(ninjaPath) {
return($$out)
}
-defineReplace(buildNinja) {
- out = $$ninjaPath()
- # check if it is not already build
- !exists($$out) {
- mkpath($$dirname(out))
- src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT")
- ninja_configure = $$system_quote($$system_path($$absolute_path(ninja/configure.py, $$src_3rd_party_dir)))
- !system("cd $$system_quote($$system_path($$dirname(out))) && python $$ninja_configure --bootstrap") {
- error("NINJA build error!")
- }
- }
-}
-
defineReplace(gnPath) {
src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT")
out = $$shadowed($$absolute_path(chromium/tools/gn/out/Release/gn, $$src_3rd_party_dir))
@@ -401,21 +388,15 @@ defineReplace(gnPath) {
return($$out)
}
-defineReplace(buildGn) {
- gn_args = $$1
- out = $$gnPath()
- !qtConfig(system-ninja): ninja_path = "--path $$ninjaPath()"
- # check if it is not already build
- !exists($$out) {
- mkpath($$dirname(out))
- src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT")
- gn_bootstrap = $$system_path($$absolute_path(chromium/tools/gn/bootstrap/bootstrap.py, $$src_3rd_party_dir))
- gn_args = $$system_quote($$gn_args)
- gn_configure = $$system_quote($$gn_bootstrap) --shadow --gn-gen-args=$$gn_args $$ninja_path
- !system("cd $$system_quote($$system_path($$dirname(out))) && python $$gn_configure") {
- error("GN build error!")
- }
+defineReplace(gnArgs) {
+ linux {
+ contains(WEBENGINE_CONFIG, embedded_build): include($$QTWEBENGINE_ROOT/src/core/config/embedded_linux.pri)
+ else: include($$QTWEBENGINE_ROOT/src/core/config/desktop_linux.pri)
}
+ macos: include($$QTWEBENGINE_ROOT/src/core/config/mac_osx.pri)
+ win32: include($$QTWEBENGINE_ROOT/src/core/config/windows.pri)
+ isEmpty(gn_args): error(No gn_args found please make sure you have valid configuration.)
+ return($$gn_args)
}
defineTest(skipBuild) {
diff --git a/tools/qmake/mkspecs/features/gn_generator.prf b/tools/qmake/mkspecs/features/gn_generator.prf
index 0e4451fa1..47a218640 100644
--- a/tools/qmake/mkspecs/features/gn_generator.prf
+++ b/tools/qmake/mkspecs/features/gn_generator.prf
@@ -224,7 +224,7 @@ GN_CONTENTS += "}"
for (inc, GN_INCLUDES): GN_CONTENTS += $$cat($$inc,lines)
}
-!build_pass: write_file($$GN_FILE, GN_CONTENTS)
+build_pass|!debug_and_release: write_file($$GN_FILE, GN_CONTENTS)
# The generated Makefile shouldn't build anything by itself, just re-run qmake if necessary
TEMPLATE = aux