mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
fuzz: Configure check for main function
This commit is contained in:
@@ -12,15 +12,6 @@
|
||||
|
||||
const std::function<void(const std::string&)> G_TEST_LOG_FUN{};
|
||||
|
||||
// Decide if main(...) should be provided:
|
||||
// * AFL needs main(...) regardless of platform.
|
||||
// * macOS handles __attribute__((weak)) main(...) poorly when linking
|
||||
// against libFuzzer. See https://github.com/bitcoin/bitcoin/pull/18008
|
||||
// for details.
|
||||
#if defined(__AFL_COMPILER) || !defined(MAC_OSX)
|
||||
#define PROVIDE_MAIN_FUNCTION
|
||||
#endif
|
||||
|
||||
#if defined(PROVIDE_MAIN_FUNCTION)
|
||||
static bool read_stdin(std::vector<uint8_t>& data)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user