Message ID | e55b6912725fa478134c7a67a9e4aeab7dca2c57.1712858920.git.steadmon@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | fuzz: build fuzzers by default on Linux | expand |
On Thu, Apr 11, 2024 at 11:14:24AM -0700, Josh Steadmon wrote: > In a future commit, we will build the fuzzer executables as part of the > default 'make all' target, which requires a C++ compiler. If we do not > explicitly set CXX, it defaults to g++ on GitHub CI. However, this can > lead to incorrect feature detection when CC=clang, since the > 'detect-compiler' script only looks at CC. Fix the issue by always > setting CXX to match CC in our CI config. Since you took my suggestion in patch 2, this "which requires a C++ compiler" is no longer true, is it? And I don't think we'd even look at the CXX variable at all, since it's now FUZZ_CXX. So this patch can just be dropped, I'd think. -Peff
On 2024.04.12 00:22, Jeff King wrote: > On Thu, Apr 11, 2024 at 11:14:24AM -0700, Josh Steadmon wrote: > > > In a future commit, we will build the fuzzer executables as part of the > > default 'make all' target, which requires a C++ compiler. If we do not > > explicitly set CXX, it defaults to g++ on GitHub CI. However, this can > > lead to incorrect feature detection when CC=clang, since the > > 'detect-compiler' script only looks at CC. Fix the issue by always > > setting CXX to match CC in our CI config. > > Since you took my suggestion in patch 2, this "which requires a C++ > compiler" is no longer true, is it? And I don't think we'd even look at > the CXX variable at all, since it's now FUZZ_CXX. > > So this patch can just be dropped, I'd think. > > -Peff Done in V3.
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3428773b09..d9986256e6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -265,42 +265,54 @@ jobs: vector: - jobname: linux-sha256 cc: clang + cxx: clang++ pool: ubuntu-latest - jobname: linux-reftable cc: clang + cxx: clang++ pool: ubuntu-latest - jobname: linux-gcc cc: gcc + cxx: g++ cc_package: gcc-8 pool: ubuntu-20.04 - jobname: linux-TEST-vars cc: gcc + cxx: g++ cc_package: gcc-8 pool: ubuntu-20.04 - jobname: osx-clang cc: clang + cxx: clang++ pool: macos-13 - jobname: osx-reftable cc: clang + cxx: clang++ pool: macos-13 - jobname: osx-gcc cc: gcc + cxx: g++ cc_package: gcc-13 pool: macos-13 - jobname: linux-gcc-default cc: gcc + cxx: g++ pool: ubuntu-latest - jobname: linux-leaks cc: gcc + cxx: g++ pool: ubuntu-latest - jobname: linux-reftable-leaks cc: gcc + cxx: g++ pool: ubuntu-latest - jobname: linux-asan-ubsan cc: clang + cxx: clang++ pool: ubuntu-latest env: CC: ${{matrix.vector.cc}} + CXX: ${{matrix.vector.cxx}} CC_PACKAGE: ${{matrix.vector.cc_package}} jobname: ${{matrix.vector.jobname}} runs_on_pool: ${{matrix.vector.pool}}
In a future commit, we will build the fuzzer executables as part of the default 'make all' target, which requires a C++ compiler. If we do not explicitly set CXX, it defaults to g++ on GitHub CI. However, this can lead to incorrect feature detection when CC=clang, since the 'detect-compiler' script only looks at CC. Fix the issue by always setting CXX to match CC in our CI config. We only plan on building fuzzers on Linux with the next patch, so for now, only adjust configuration for the Linux CI jobs. Signed-off-by: Josh Steadmon <steadmon@google.com> --- .github/workflows/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+)