summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-09-25 12:54:12 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-09-25 15:39:02 +0200
commit9a1eb86f3d4cd4b0d99f053f9bc9d304289b99f7 (patch)
treec0774c6a2913b7aa48c11295376f9e7ba71c1647 /mkspecs
parentd512f5ac3a53f7d153e9d1de8d3f468273bd7708 (diff)
macOS: Prevent warnings about object files without any symbols
Change-Id: Iafe976bdd27da0476b2e6bb6d84db8ca34aa0a62 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/mac/no_warn_empty_obj_files.prf7
-rw-r--r--mkspecs/features/qt_build_config.prf3
2 files changed, 10 insertions, 0 deletions
diff --git a/mkspecs/features/mac/no_warn_empty_obj_files.prf b/mkspecs/features/mac/no_warn_empty_obj_files.prf
new file mode 100644
index 0000000000..598938ab12
--- /dev/null
+++ b/mkspecs/features/mac/no_warn_empty_obj_files.prf
@@ -0,0 +1,7 @@
+# Prevent warnings about object files without any symbols. This is a common
+# thing in Qt as we tend to build files unconditionally, and then use ifdefs
+# to compile out parts that are not relevant.
+QMAKE_RANLIB += -no_warning_for_no_symbols
+
+# We have to tell 'ar' to not run ranlib by itself
+QMAKE_AR += -S
diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf
index 745b09a885..8273ba3fe1 100644
--- a/mkspecs/features/qt_build_config.prf
+++ b/mkspecs/features/qt_build_config.prf
@@ -88,6 +88,9 @@ cross_compile: \
android|uikit|winrt: \
CONFIG += builtin_testdata
+# Prevent warnings about object files without any symbols
+macos: CONFIG += no_warn_empty_obj_files
+
CONFIG += \
utf8_source \
create_prl link_prl \