From 295a915b5ae66ad9485b38e7d05040cf0321cd4e Mon Sep 17 00:00:00 2001
From: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Date: Tue, 6 Oct 2015 09:39:40 +0200
Subject: [PATCH] fix link error with MSVC
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Since qtbase/e88334e0 we must not put MSVC linker flags into LIBS or
LIBS_PRIVATE. QMAKE_LFLAGS is the right place.

This fixes a build error with MSVC:
LINK : fatal error LNK1181: cannot open input file '\OPT:REF.obj'

Change-Id: I2971e412dd8d5cfe8b7aca218d679dd136019dd8
Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
---
 src/core/core_module.pro | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/core_module.pro b/src/core/core_module.pro
index cf253a735..68d46cd5a 100644
--- a/src/core/core_module.pro
+++ b/src/core/core_module.pro
@@ -22,7 +22,7 @@ osx {
 } else:msvc {
     # Simulate -whole-archive by passing the list of object files that belong to the public
     # API library as response file to the linker.
-    LIBS_PRIVATE += /OPT:REF
+    QMAKE_LFLAGS += /OPT:REF
     QMAKE_LFLAGS += @$${api_library_path}$${QMAKE_DIR_SEP}$${api_library_name}.lib.objects
 } else {
     LIBS_PRIVATE += -Wl,-whole-archive -l$$api_library_name -Wl,-no-whole-archive
-- 
GitLab