netdata_netdata/.github/dockerfiles
Austin S. Hemmelgarn 7063e112d2
Fix handling of hardening flags with Clang (#16731)
* Use `-Werror` when checking compiler flags.

This should ensure that Clang rejects unknown flags correctly instead of
blindly eating some of them.

* Explicitly check C and C++ flags separately.

This should better handle the unusual case of mismatched compilers.

* Properly use Clang for C++ in our CI checks that build using Clang.

* Apply suggestions from code review

Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>

* Use functions and loops when possible.

* Fix typos and broken loops.

* Fix more typos.

* Fix bogus commas.

* Fix caching of compiler flag checks.

* Fix flag variable names to make them behave correctly in checks.

CMake adds a preprocessor define with the name of the variable being
defined by a compiler flag check, so we need to ensure not only that
the variable name is unique, but also that it is a valid name for a C
preprocessor definition.

* Fix scoping.

* Fix botched merge during previous rebase.

---------

Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
2024-01-12 11:25:07 -05:00
..
Dockerfile.build_test rename DO_NOT_TRACK to DISABLE_TELEMETRY (#12126) 2022-02-15 17:23:32 +03:00
Dockerfile.clang Fix handling of hardening flags with Clang (#16731) 2024-01-12 11:25:07 -05:00