summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-02-09 12:00:15 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-03-01 16:05:00 +0000
commitedd8f2840d85e35bbec905440b0b524d7e0d108e (patch)
tree14f453473b6c1cc0cfec1e1ff8a5b572e4c8de77 /tools
parent5c42809274288811b386b3cb3cd08000777e37c8 (diff)
Support cross-builds and alternative compilers with GN
Adds GN versions of the gyp_configure targets, to create custom toolchains we can use to override compilers used by GN. Change-Id: Ic3a9cb7e83f845180396faff632f72f9c24f3365 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmake/mkspecs/features/configure.prf3
-rw-r--r--tools/qmake/mkspecs/features/functions.prf19
2 files changed, 20 insertions, 2 deletions
diff --git a/tools/qmake/mkspecs/features/configure.prf b/tools/qmake/mkspecs/features/configure.prf
index b17626c3..f12bf5ae 100644
--- a/tools/qmake/mkspecs/features/configure.prf
+++ b/tools/qmake/mkspecs/features/configure.prf
@@ -35,7 +35,7 @@ defineTest(runConfigure) {
}
isQtMinimum(5, 9) {
qtConfig(appstore-compliant): WEBENGINE_CONFIG += use_appstore_compliant_code
- linux: !cross_compile: WEBENGINE_CONFIG += use_gn
+ linux: WEBENGINE_CONFIG += use_gn
macos: WEBENGINE_CONFIG += use_gn
win32: WEBENGINE_CONFIG += use_gn
}
@@ -57,7 +57,6 @@ defineTest(runConfigure) {
packagesExist("\'glib-2.0 >= 2.32.0\'"): WEBENGINE_CONFIG += use_glib
else: skipBuild("System glib is too old (min. version 2.32).$${EOL}")
}
- !contains(WEBENGINE_CONFIG, embedded_build): REQUIRED_PACKAGES += libpci
for(package, $$list($$REQUIRED_PACKAGES)) {
!packagesExist($$package):skipBuild("Unmet dependency: $$package")
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index 6ef87f86..5e294b96 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -411,6 +411,25 @@ defineReplace(gnArgs) {
return($$gn_args)
}
+defineReplace(gnArch) {
+ qtArch = $$1
+ contains(qtArch, "i386"): return(x86)
+ contains(qtArch, "x86_64"): return(x64)
+ contains(qtArch, "arm"): return(arm)
+ contains(qtArch, "arm64"): return(arm64)
+ contains(qtArch, "mips"): return(mipsel)
+ contains(qtArch, "mips64"): return(mips64el)
+ return(unknown)
+}
+
+defineReplace(gnOS) {
+ macos: return(mac)
+ win32: return(win)
+ linux: return(linux)
+ error(Unsupported platform)
+ return(unknown)
+}
+
defineTest(skipBuild) {
skipBuildReason = "$$skipBuildReason $${EOL}$$1"
export(skipBuildReason)