We used to assume that unix systems building against Qt5 would have
a compiler that supported -MD. Although this was usually the case,
we failed to take into account broken tools for distributed builds
(e.g. teambuilder or icecream) which would end up producing .d files
in the root of the build dir instead of along-side the object file.
Now that we use a config-test to determine the support, we'll capture
those cases, unless distributed builds are enabled after the initial
build-webkit run.
Reviewed by Csaba Osztrogonác.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109733
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-03-05 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Use config test to determine if the compiler supports -MD
+
+ We used to assume that unix systems building against Qt5 would have
+ a compiler that supported -MD. Although this was usually the case,
+ we failed to take into account broken tools for distributed builds
+ (e.g. teambuilder or icecream) which would end up producing .d files
+ in the root of the build dir instead of along-side the object file.
+
+ Now that we use a config-test to determine the support, we'll capture
+ those cases, unless distributed builds are enabled after the initial
+ build-webkit run.
+
+ Reviewed by Csaba Osztrogonác.
+
+ * Tools.pro:
+ * qmake/config.tests/gccdepends/empty.cpp: Added.
+ * qmake/config.tests/gccdepends/gccdepends.pro: Added.
+ * qmake/mkspecs/features/default_pre.prf:
+ * qmake/mkspecs/features/features.prf:
+ * qmake/mkspecs/features/unix/default_pre.prf:
+ * qmake/sync.profile:
+
2012-03-05 Csaba Osztrogonác <ossy@webkit.org>
Qt API test buildstep throws exception after buildmaster update
qmake/sync.profile \
qmake/config.tests/README \
qmake/config.tests/fontconfig/* \
+ qmake/config.tests/gccdepends/* \
qmake/mkspecs/modules/* \
qmake/mkspecs/features/*.prf \
qmake/mkspecs/features/mac/*.prf \
--- /dev/null
+TEMPLATE = aux
+SOURCES += empty.cpp
+OBJECTS_DIR = obj
+QMAKE_CXXFLAGS += -MD
+
+test.commands = test -f $$OBJECTS_DIR/empty.d && test ! -f empty.d && touch $$basename(PWD)
+test.depends = $$OBJECTS_DIR/empty.o
+QMAKE_EXTRA_TARGETS += test
+
+default.target = all
+default.depends += test
+QMAKE_EXTRA_TARGETS += default
load(functions)
+# Load results of config tests (only supported in Qt 5)
+haveQt(5): include($${ROOT_BUILD_DIR}/Tools/qmake/.qmake.cache, , true)
+
+unix:config_test_gccdepends {
+ # We have a compiler that supports the -MD option (and neither
+ # teambuilder nor icecream is messing up the .d file output).
+ CONFIG += GNUmake gcc_MD_depends
+}
+
# FIXME: In this case we probably want to exit early so that we
# don't load all of the custom build tweaks needlessly.
pro_file = $$_PRO_FILE_ # Checking the variable directly does not work
# See 'Tools/qmake/README' for an overview of the build system
# -------------------------------------------------------------------
-# Load results of config tests (only supported in Qt 5)
-haveQt(5): include($${ROOT_BUILD_DIR}/Tools/qmake/.qmake.cache, , true)
-
CONFIG(minimal) {
DEFINES += ENABLE_NETSCAPE_PLUGIN_API=0
}
load(functions)
-# Assume we use GNU make and a non-ancient GCC (compatible)
-# compiler that supports the -MD option. Relies on changes
-# introduced in Qt 5 to work correctly.
-haveQt(5): CONFIG += GNUmake gcc_MD_depends object_parallel_to_source
+haveQt(5): CONFIG += object_parallel_to_source
# Expose if we are building inside Scratchbox
SBOX_CHECK = $$(_SBOX_DIR)
# This file is only used for config tests
%configtests = (
fontconfig => {},
+ gccdepends => {},
);