summaryrefslogtreecommitdiffstats
path: root/qmake/Makefile.win32
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-01-03 16:40:30 +0100
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-01-06 20:09:08 +0000
commit52d64fca662d0e488801fc40dffdc0a732cfdbd5 (patch)
treef50f35fa5df16dca9e43ac95d23cb7c39422dd5d /qmake/Makefile.win32
parent17b6967f6811cb3adeb8c7eb79a422d2c10ee0d1 (diff)
revert to building qmake with qconfig.cpp
turns out that just appending builtin-qt.conf isn't a good idea: executable-editing tools (objcopy, prelink, etc.) will happily drop the "attachment". a safe method would be adding a proper section to the executable, but there doesn't appear to be an objcopy equivalent in msvc, and using entirely different methods of embedding the file with different toolchains seems like a rather bad idea. so instead go back to the old method of building qmake with a generated qconfig.cpp. of course, as said file is now created by qmake itself, we have to compile qlibraryinfo.cpp a second time, and link a second qmake executable. Task-number: QTBUG-57803 Change-Id: I9e232693550aa870cec154e49cc06add13017cc2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'qmake/Makefile.win32')
-rw-r--r--qmake/Makefile.win3221
1 files changed, 17 insertions, 4 deletions
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32
index 9e1f5136ef..c2e32dfc20 100644
--- a/qmake/Makefile.win32
+++ b/qmake/Makefile.win32
@@ -108,7 +108,6 @@ QTOBJS= \
quuid.obj \
qvector.obj \
qsettings.obj \
- qlibraryinfo.obj \
qvariant.obj \
qsettings_win.obj \
qmetatype.obj \
@@ -124,12 +123,16 @@ QTOBJS= \
qjsonvalue.obj
first all: $(BUILD_PATH)\bin\qmake.exe
+binary: $(BUILD_PATH)\qmake\qmake.exe
-$(BUILD_PATH)\bin\qmake.exe: $(OBJS) $(QTOBJS)
- $(LINKER) $(LFLAGS) /OUT:$(BUILD_PATH)\bin\qmake.exe $(OBJS) $(QTOBJS) $(PCH_OBJECT) $(LIBS)
+$(BUILD_PATH)\bin\qmake.exe: $(OBJS) $(QTOBJS) qlibraryinfo.obj
+ $(LINKER) $(LFLAGS) /OUT:$(BUILD_PATH)\bin\qmake.exe $(OBJS) $(QTOBJS) qlibraryinfo.obj $(PCH_OBJECT) $(LIBS)
+
+$(BUILD_PATH)\qmake\qmake.exe: $(OBJS) $(QTOBJS) qlibraryinfo_final.obj
+ $(LINKER) $(LFLAGS) /OUT:$(BUILD_PATH)\qmake\qmake.exe $(OBJS) $(QTOBJS) qlibraryinfo_final.obj $(PCH_OBJECT) $(LIBS)
clean::
- -del $(QTOBJS)
+ -del $(QTOBJS) qlibraryinfo.obj qlibraryinfo_final.obj
-del $(OBJS)
-del qmake_pch.obj
-del qmake_pch.pch
@@ -139,6 +142,7 @@ clean::
distclean:: clean
-del $(BUILD_PATH)\bin\qmake.exe
+ -del $(BUILD_PATH)\qmake\qmake.exe
-del Makefile
.cpp.obj:
@@ -148,6 +152,9 @@ $(OBJS): $(PCH_OBJECT)
$(QTOBJS): $(PCH_OBJECT)
+qlibraryinfo.obj: $(PCH_OBJECT)
+qlibraryinfo_final.obj: $(PCH_OBJECT)
+
qmake_pch.obj:
$(CXX) $(CXXFLAGS_BARE) -c -Yc -Fpqmake_pch.pch -TP $(QMKSRC)\qmake_pch.h
@@ -199,3 +206,9 @@ qmake_pch.obj:
# Make sure qstring_compat.obj isn't compiled with PCH enabled
qstring_compat.obj: $(SOURCE_PATH)\src\corelib\tools\qstring_compat.cpp
$(CXX) -c $(CXXFLAGS_BARE) $(SOURCE_PATH)\src\corelib\tools\qstring_compat.cpp
+
+qlibraryinfo.obj: $(SOURCE_PATH)\src\corelib\global\qlibraryinfo.cpp
+ $(CXX) $(CXXFLAGS) -DQT_BUILD_QMAKE_BOOTSTRAP $(SOURCE_PATH)\src\corelib\global\qlibraryinfo.cpp
+
+qlibraryinfo_final.obj: $(SOURCE_PATH)\src\corelib\global\qlibraryinfo.cpp $(BUILD_PATH)\src\corelib\global\qconfig.cpp
+ $(CXX) $(CXXFLAGS) -Foqlibraryinfo_final.obj $(SOURCE_PATH)\src\corelib\global\qlibraryinfo.cpp