git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Josh Steadmon <steadmon@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Makefile: use CXXFLAGS for linking fuzzers
Date: Tue, 13 Nov 2018 10:50:32 -0800	[thread overview]
Message-ID: <20181113185032.GC126896@google.com> (raw)
In-Reply-To: <xmqq36s5y8l2.fsf@gitster-ct.c.googlers.com>

On 2018.11.13 12:12, Junio C Hamano wrote:
> steadmon@google.com writes:
> 
> > OSS-Fuzz requires C++-specific flags to link fuzzers. Passing these in
> > CFLAGS causes lots of build warnings. Using separate CXXFLAGS avoids
> > this.
> 
> We are not a C++ shop, so allow me to show ignorance about how
> projects that are OSS-Fuzz-enabled work.  Do they use one set of
> CXXFLAGS when compiling the "real thing" and a separate set (perhaps
> one is subset of the other, or perhaps these two just have overlap)
> of CXXFLAGS when building to link with the fuzzer?
> 
> What I am trying to get at is if this should be CXXFLAGS or
> CXX_FUZZER_FLAGS.  If the OSS-Fuzz-enabled C++ projects use one set
> of flags for the "main" part of the project (to produce binaries to
> be run by the end users) and then link with extra flags to work with
> fuzzers, I would imagine that they won't call the latter CXXFLAGS
> but call it something else, and we probably should follow suit if
> that is the case.
> 
> Not that we plan to (re)write the maint part of Git in C++ ever, so
> I am personally OK with sacrificing the most generic CXXFLAGS macro
> for the sole use of OSS-Fuzz linkage, but I'd prefer to leave the
> door open so that other things like OSS-Fuzz that require C++ can be
> added like your work does to the project.
> 
> Thanks.

OSS-Fuzz only provides one set of CXXFLAGS for use on both compiling
project C++ project files as well linking the fuzzers themselves. So in
the event that Git ever added any C++ sources, they would need to use
the same set of CXXFLAGS.

Given that, do you agree with Stefan that it is more intuitive to define
CXXFLAGS next to the fuzzer build rules, since that's the only place
it's used for now?

  reply	other threads:[~2018-11-13 18:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12 22:02 [PATCH] Makefile: use CXXFLAGS for linking fuzzers steadmon
2018-11-12 22:47 ` Stefan Beller
2018-11-13  3:12 ` Junio C Hamano
2018-11-13 18:50   ` Josh Steadmon [this message]
2018-11-14  2:56     ` Junio C Hamano
2018-11-14 19:41 ` [PATCH v2] Makefile: use FUZZ_CXXFLAGS " Josh Steadmon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181113185032.GC126896@google.com \
    --to=steadmon@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).