summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-12-03 19:36:29 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2015-12-03 19:36:29 +0100
commit90d3044e3a6ad58819be6787b5edcbc9daa948dc (patch)
tree27d54322988fe60a420bbb058608b9b9d637329b /tools
parent03301c0fbdf034fb987e1c1ed1bec7c206dcd27e (diff)
parentd0ae9b50cc01e4c0f65f17467276d4af40284ae1 (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Diffstat (limited to 'tools')
-rwxr-xr-xtools/buildscripts/gyp_qtwebengine8
-rw-r--r--tools/qmake/mkspecs/features/functions.prf31
2 files changed, 30 insertions, 9 deletions
diff --git a/tools/buildscripts/gyp_qtwebengine b/tools/buildscripts/gyp_qtwebengine
index b2ff4cbc4..ec24caeb1 100755
--- a/tools/buildscripts/gyp_qtwebengine
+++ b/tools/buildscripts/gyp_qtwebengine
@@ -132,6 +132,14 @@ if __name__ == '__main__':
# list.
args.append('--no-circular-check')
+ # libtool on Mac warns about duplicate basenames in static libraries, so
+ # they're disallowed in general by gyp. We are lax on this point, so disable
+ # this check other than on Mac. GN does not use static libraries as heavily,
+ # so over time this restriction will mostly go away anyway, even on Mac.
+ # https://code.google.com/p/gyp/issues/detail?id=384
+ if sys.platform != 'darwin':
+ args.append('--no-duplicate-basename-check')
+
args.extend(['-D', 'webkit_src_dir=' + chrome_src + '/third_party/WebKit'])
# the top_level source directory is the first common ancestor of our module and the chromium source tree for the build to be sane.
# commonprefix works on a character basis, so it might return a phony common prefix (not the common parent directory we expect),
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index d5265ab00..2c75f4984 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -163,17 +163,30 @@ defineTest(use?) {
}
defineReplace(findOrBuildNinja) {
- # If NINJA_PATH env var is set, prefer that.
- # Fallback to locating our own bootstrapped ninja.
- out = $(NINJA_PATH)
- !exists($$out) {
- out = $$absolute_path("$${getChromiumSrcDir()}/../ninja/ninja", "$$QTWEBENGINE_ROOT")
- win32: out = $$system_path($${out}.exe)
+ # If NINJA_PATH env var is set, prefer that.
+ # Fallback to locating our own bootstrapped ninja.
+ out = $(NINJA_PATH)
+ !exists($$out) {
+ src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT")
+
+ out = $$shadowed($$absolute_path("ninja/ninja", "$$src_3rd_party_dir"))
+ win32: out = $${out}.exe
- # If we did not find ninja, then we bootstrap it.
- !exists($$out): system("cd $$dirname(out) && python configure.py --bootstrap")
+ out = $$system_path($$out)
+ # If we did not find ninja, then we bootstrap it.
+ !exists($$out) {
+ # If we are making a shadow build, copy the ninja sources to the build directory.
+ !equals(PWD, $${OUT_PWD}) {
+ log("Build directory is different from source directory - copying ninja sources to the build tree...")
+ shadow_3rd_party_path = $$system_path($$shadowed($$src_3rd_party_dir))
+
+ !exists($$dirname(out)): mkpath($$shadow_3rd_party_path)
+ system("$$QMAKE_COPY_DIR $$system_quote($$system_path($$absolute_path("ninja", "$$src_3rd_party_dir"))) $$system_quote($$shadow_3rd_party_path)")
+ }
+ system("cd $$system_quote($$dirname(out)) && python configure.py --bootstrap")
}
- return($$out)
+ }
+ return($$out)
}
defineTest(skipBuild) {