git/ci
Josh Steadmon 8427b7e72b fuzz: link fuzz programs with `make all` on Linux
Since 5e47215080 (fuzz: add basic fuzz testing target., 2018-10-12), we
have compiled object files for the fuzz tests as part of the default
'make all' target. This helps prevent bit-rot in lesser-used parts of
the codebase, by making sure that incompatible changes are caught at
build time.

However, since we never linked the fuzzer executables, this did not
protect us from link-time errors. As of 8b9a42bf48 (fuzz: fix fuzz test
build rules, 2024-01-19), it's now possible to link the fuzzer
executables without using a fuzzing engine and a variety of
compiler-specific (and compiler-version-specific) flags, at least on
Linux. So let's add a platform-specific option in config.mak.uname to
link the executables as part of the default `make all` target.

Since linking the fuzzer executables without a fuzzing engine does not
require a C++ compiler, we can change the FUZZ_PROGRAMS build rule to
use $(CC) by default. This avoids compiler mis-match issues when
overriding $(CC) but not $(CXX). When we *do* want to actually link with
a fuzzing engine, we can set $(FUZZ_CXX). The build instructions in the
CI fuzz-smoke-test job and in the Makefile comment have been updated
accordingly.

While we're at it, we can consolidate some of the fuzzer build
instructions into one location in the Makefile.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-04-24 11:56:40 -07:00
..
config ci: deprecate ci/config/allow-ref script 2023-08-30 15:56:11 -07:00
util travis-ci: include the trash directories of failed tests in the trace log 2018-08-01 09:59:36 -07:00
check-directional-formatting.bash ci: disallow directional formatting 2021-11-04 10:13:10 -07:00
install-dependencies.sh ci: make p4 setup on macOS more robust 2024-01-18 11:53:17 -08:00
install-docker-dependencies.sh ci: add job performing static analysis on GitLab CI 2024-01-08 11:23:03 -08:00
lib.sh ci: add jobs to test with the reftable backend 2024-02-07 08:28:37 -08:00
make-test-artifacts.sh ci(github): use grouping also in the `win-build` job 2022-06-13 09:58:41 -07:00
mount-fileshare.sh Add a build definition for Azure DevOps 2019-01-29 09:26:46 -08:00
print-test-failures.sh ci: handle TEST_OUTPUT_DIRECTORY when printing test failures 2024-01-18 11:53:17 -08:00
run-build-and-minimal-fuzzers.sh fuzz: link fuzz programs with `make all` on Linux 2024-04-24 11:56:40 -07:00
run-build-and-tests.sh ci: add jobs to test with the reftable backend 2024-02-07 08:28:37 -08:00
run-docker-build.sh CI: rename the "Linux32" job to lower-case "linux32" 2021-11-23 16:51:53 -08:00
run-docker.sh CI: rename the "Linux32" job to lower-case "linux32" 2021-11-23 16:51:53 -08:00
run-static-analysis.sh i18n CI: stop allowing non-ASCII source messages in po/git.pot 2022-05-26 10:30:28 -07:00
run-test-slice.sh ci: run unit tests in CI 2023-11-10 08:15:32 +09:00
test-documentation.sh ci: ignore rubygems warning in the "Documentation" job 2020-02-10 09:52:27 -08:00