summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2019-05-16 21:58:06 +0200
committerMikko Gronoff <mikko.gronoff@qt.io>2019-05-27 12:48:45 +0000
commitfed3e5ce397c9698b5d9546e2edfcb3504c403c3 (patch)
tree4619c4ee09bedfa5f25ed7cccc21df38ad5632b0
parent34c00625d02db6167ae13f56e4b5bc0e94b602c9 (diff)
downloadqtwebengine-fed3e5ce397c9698b5d9546e2edfcb3504c403c3.tar.gz
Fix linker too long argument list
For yocto builds linker can get quite long path since all archives are listed as absolute paths. This can end up as "execvp: /bin/sh: Argument list too long" Use rsp files also for archives. Change-Id: I096e2f35ed72b68261bf465e84baddd1f78cd917 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 546c42e42643a209d893d5291c26c3f8ef7102a3) Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r--src/core/core_module.pro17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/core/core_module.pro b/src/core/core_module.pro
index 3b5d37f29..0217d2a2b 100644
--- a/src/core/core_module.pro
+++ b/src/core/core_module.pro
@@ -25,14 +25,17 @@ isEmpty(NINJA_LIBS): error("Missing library files from QtWebEngineCore linking p
NINJA_OBJECTS = $$eval($$list($$NINJA_OBJECTS))
# Do manual response file linking for macOS and Linux
-RSP_FILE = $$OUT_PWD/$$getConfigDir()/$${TARGET}.rsp
-for(object, NINJA_OBJECTS): RSP_CONTENT += $$object
-write_file($$RSP_FILE, RSP_CONTENT)
-macos:LIBS_PRIVATE += -Wl,-filelist,$$shell_quote($$RSP_FILE)
-linux:LIBS_PRIVATE += @$$RSP_FILE
+RSP_OBJECT_FILE = $$OUT_PWD/$$getConfigDir()/$${TARGET}_o.rsp
+for(object, NINJA_OBJECTS): RSP_O_CONTENT += $$object
+write_file($$RSP_OBJECT_FILE, RSP_O_CONTENT)
+RSP_ARCHIVE_FILE = $$OUT_PWD/$$getConfigDir()/$${TARGET}_a.rsp
+for(archive, NINJA_ARCHIVES): RSP_A_CONTENT += $$archive
+write_file($$RSP_ARCHIVE_FILE, RSP_A_CONTENT)
+macos:LIBS_PRIVATE += -Wl,-filelist,$$shell_quote($$RSP_OBJECT_FILE)
+linux:LIBS_PRIVATE += @$${RSP_OBJECT_FILE}
# QTBUG-58710 add main rsp file on windows
-win32:QMAKE_LFLAGS += @$$RSP_FILE
-linux: LIBS_PRIVATE += -Wl,--start-group $$NINJA_ARCHIVES -Wl,--end-group
+win32:QMAKE_LFLAGS += @$${RSP_OBJECT_FILE}
+linux: LIBS_PRIVATE += -Wl,--start-group @$${RSP_ARCHIVE_FILE} -Wl,--end-group
else: LIBS_PRIVATE += $$NINJA_ARCHIVES
LIBS_PRIVATE += $$NINJA_LIB_DIRS $$NINJA_LIBS
# GN's LFLAGS doesn't always work across all the Linux configurations we support.