Skip to content

automoc: silence linker warning on macos

when an empty mocs_compilation.cpp is included in a static library, the macos linker emits a warning:

/Applications/Xcode13.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
file: path/To/Library.a(mocs_compilation.cpp.o) has no symbols

we therefore generate a globally visible function and hope that no application uses the same function name.

Fixes: #23551
Topic-rename: automoc-silence-ranlib-warning

Edited by Brad King

Merge request reports