From 9a1eb86f3d4cd4b0d99f053f9bc9d304289b99f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 25 Sep 2019 12:54:12 +0200 Subject: macOS: Prevent warnings about object files without any symbols Change-Id: Iafe976bdd27da0476b2e6bb6d84db8ca34aa0a62 Reviewed-by: Alexandru Croitor --- mkspecs/features/mac/no_warn_empty_obj_files.prf | 7 +++++++ mkspecs/features/qt_build_config.prf | 3 +++ 2 files changed, 10 insertions(+) create mode 100644 mkspecs/features/mac/no_warn_empty_obj_files.prf 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 \ -- cgit v1.2.3