summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2019-05-16 21:58:06 +0200
committerMichal Klocek <michal.klocek@qt.io>2019-05-20 12:48:17 +0200
commit546c42e42643a209d893d5291c26c3f8ef7102a3 (patch)
tree6db1c0a56d6923aa255ec623a8b8e410bc658987
parentfffd02a307aeae30ceb6184503f8ebbf73812095 (diff)
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>
-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 e2fa3494d..10169a49e 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.