Draft: enable building with clang+lto
Summary
(Describe what the merge request does) This enables building NetworkManager with lto with the clang compiler
Purpose
(Describe why the merge request is useful, which use cases it addresses, which issue it fixes) this fixes #593 (closed) which was auto-closed. I did see a pr that was closed due to multiple changes in one commit however in 2 years the state of everything has changed which means, with minimal changes(only to meson.build) we are able to build NetworkManager with lto. I have been able to run the test suit locally and it all passes
Checklist
Please read https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md before opening the merge request. In particular, check that:
-
the subject for all commits is concise and explicative -
the message for all commits explains the reason for the change -
the source is properly formatted -
any relevant documentation is up to date -
you have added unit tests if applicable -
the NEWS file is updated when the change deserves to be mentioned, for example for new features, behavior changes, API deprecations, etc.