summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.