summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2020-07-20 16:26:38 +0200
committerMichal Klocek <michal.klocek@qt.io>2020-07-23 13:13:12 +0000
commitff50fbf446f8902b91613930b6705d0074bd9872 (patch)
tree35d9840e0e328ba982da88e06097d04616b63488
parent74fe796039e85c97ffac3f7b014ca718e7284dea (diff)
Cleanup linking param order and prl generation
When doing builds we use rsp files also for archives. For static builds this would require to install rsp file. Since static builds are possible only for qtpdf with small amount of archives simply do not use rsp files for archives. Cleanup linker parameters so prl files do not point object rsp files (do not use LIBS_PRIVATE in that case). Task-number: QTBUG-85616 Change-Id: I165610e418f162c16fcfa7056af3344b80f60c05 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--src/buildtools/config/linking.pri30
1 files changed, 26 insertions, 4 deletions
diff --git a/src/buildtools/config/linking.pri b/src/buildtools/config/linking.pri
index a458b06bc..0ee18f3a5 100644
--- a/src/buildtools/config/linking.pri
+++ b/src/buildtools/config/linking.pri
@@ -24,10 +24,32 @@ 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}) @$${RSP_ARCHIVE_FILE}
-linux:QMAKE_LFLAGS += @$${RSP_OBJECT_FILE} -Wl,--start-group @$${RSP_ARCHIVE_FILE} -Wl,--end-group
-win32:QMAKE_LFLAGS += @$${RSP_OBJECT_FILE} @$${RSP_ARCHIVE_FILE}
-ios: OBJECTS += $$NINJA_OBJECTS
+if(macos|ios) {
+ QMAKE_LFLAGS += -Wl,-filelist,$$shell_quote($${RSP_OBJECT_FILE})
+ !static {
+ QMAKE_LFLAGS += @$${RSP_ARCHIVE_FILE}
+ } else {
+ LIBS_PRIVATE += $${NINJA_ARCHIVES}
+ }
+}
+
+linux {
+ QMAKE_LFLAGS += @$${RSP_OBJECT_FILE}
+ !static {
+ QMAKE_LFLAGS += -Wl,--start-group @$${RSP_ARCHIVE_FILE} -Wl,--end-group
+ } else {
+ LIBS_PRIVATE += -Wl,--start-group @$${NINJA_ARCHIVES} -Wl,--end-group
+ }
+}
+
+win32 {
+ QMAKE_LFLAGS += @$${RSP_OBJECT_FILE}
+ !static {
+ QMAKE_LFLAGS += @$${RSP_ARCHIVE_FILE}
+ } 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.