Fix emar invocation on Windows for MinGW

If qmake is called without sh.exe in PATH, the relative paths
in OBJECTS will contain backslashes as separator.

Anyhow, emar needs forward slashes. Use GNU make's subst command
to fix this.

This amends  22c1e10e1955c63.

Task-number: QTBUG-75257
Change-Id: Iacc6fe69cf470f35c6ddd829be7a80944346452d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Kai Koehne 2019-05-09 11:58:23 +02:00 committed by Jani Heikkinen
parent fc3e851414
commit 9dbbccf7a2

View File

@ -96,7 +96,7 @@ QMAKE_EXTENSION_STATICLIB = a # llvm bitcode
QMAKE_AR = emar cqs
equals(QMAKE_HOST.os, Windows) {
QMAKE_AR_CMD = \
"$(file >$(OBJECTS_DIR)/$(TARGET).rsp, $(OBJECTS))$$escape_expand(\\n\\t)" \
"$(file >$(OBJECTS_DIR)/$(TARGET).rsp, $(subst \\,/,$(OBJECTS)))$$escape_expand(\\n\\t)" \
"$(AR) $(DESTDIR)$(TARGET) @$(OBJECTS_DIR)/$(TARGET).rsp"
}