Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
ff06631
compile_target.sh: try bumping make -j, switching to ninja
vszakats Jul 29, 2025
0df3c15
tweak build options for better perf
vszakats Jul 29, 2025
5748696
try install ninja
vszakats Jul 29, 2025
c21069e
try install ninja 2
vszakats Jul 29, 2025
a354d06
try install ninja 3
vszakats Jul 29, 2025
422ddef
ninja not available or does not work
vszakats Jul 29, 2025
1167fbc
give up on ninja for now
vszakats Aug 5, 2025
68cb280
try dropping wget, seems unused
vszakats Aug 5, 2025
1d91ad2
download xz where available
vszakats Aug 5, 2025
539f0de
cmake disable download progress to reduce log noise
vszakats Aug 5, 2025
7c2dd08
env then run (to match flow)
vszakats Aug 5, 2025
733e770
use ninja if present
vszakats Aug 5, 2025
1a313ab
try fixing $(MAKE) use that breaks Ninja
vszakats Aug 5, 2025
09fb9a9
this is the default in recent runners
vszakats Aug 5, 2025
198bf60
dis ninja temp
vszakats Aug 5, 2025
5ad325b
try sth 1
vszakats Aug 5, 2025
8086968
try sth 2
vszakats Aug 5, 2025
f0a162a
try ninja with zstd
vszakats Aug 5, 2025
47e88f3
not much to gain with ninja after all, everything is gnu make, except…
vszakats Aug 5, 2025
6326ec7
use nproc, show MAKEFLAGS
vszakats Aug 5, 2025
341e931
ossfuzzdeps.sh undo changes that did not make a difference
vszakats Aug 5, 2025
8ce63bd
try switching nghttp2 to cmake, for speed
vszakats Aug 5, 2025
a9d90a1
nghttp2: drop zlib, not used by lib-only buils
vszakats Aug 5, 2025
ce06507
try dropping BUILD_COMMAND
vszakats Aug 5, 2025
ba7dd36
try telling cmake that curl is creating libcurl.a
vszakats Aug 5, 2025
6cc3172
specify byproducts in externproject, required for ninja
vszakats Aug 5, 2025
674bcbb
try dropping INSTALL_COMMAND
vszakats Aug 5, 2025
fe5d321
try ninja again
vszakats Aug 5, 2025
12e1d07
fix MAKEFLAGS in docker
vszakats Aug 6, 2025
0b20ff1
apt: drop progress bar to reduce log noise
vszakats Aug 6, 2025
86b1cc7
only use ninja when available
vszakats Aug 6, 2025
3988537
try dropping INSTALL_COMMAND 2
vszakats Aug 6, 2025
0f2799b
nghttp2 disable building docs
vszakats Aug 6, 2025
e67703d
try switching curl build to cmake
vszakats Aug 6, 2025
0c027fd
curl: do not build the curl tool
vszakats Aug 6, 2025
037739a
fixups
vszakats Aug 6, 2025
363b301
drop unused Microsoft repo from pkg sources
vszakats Aug 6, 2025
10e0b09
curl build: drop options that do nothing with a GIT source
vszakats Aug 6, 2025
e04a3e0
try dropping no-op SOURCE_SUBDIR options
vszakats Aug 6, 2025
b4709d0
try dropping no-op BUILD_IN_SOURCE options
vszakats Aug 6, 2025
5868019
refix CURL_POST_INSTALL_COMMAND
vszakats Aug 6, 2025
36b29f1
groff base is a single, tiny package, revert
vszakats Aug 6, 2025
06ac61a
try nproc + 1 again (as in curl main repo)
vszakats Aug 6, 2025
64e3fe5
Revert "try nproc + 1 again (as in curl main repo)"
vszakats Aug 6, 2025
40c5897
drop exec attr from fuzz_fnmatch.cc
vszakats Aug 6, 2025
f54b35d
add EOL at EOF
vszakats Aug 6, 2025
a6d8816
nproc + 1 another test
vszakats Aug 6, 2025
c07929e
drop redundant MAKEFLAGS settings
vszakats Aug 6, 2025
4c0e92d
ossfuzz.sh drop duplicate env dumps
vszakats Aug 6, 2025
d321b8b
try with invalid -j
vszakats Aug 6, 2025
19adb96
Revert "try with invalid -j"
vszakats Aug 6, 2025
447cccb
stop doing man-db updates to save time
vszakats Aug 6, 2025
29f8fc4
cleanup
vszakats Aug 6, 2025
425fa45
cleanup 2
vszakats Aug 6, 2025
0457c53
try keeping builds less verbose, like before
vszakats Aug 6, 2025
4d7b6e6
no dep tracking option for openldap
vszakats Aug 6, 2025
8bf7752
try sth 1
vszakats Aug 6, 2025
e0a9e67
cleanup
vszakats Aug 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,15 @@ jobs:
repository: curl/curl-fuzzer
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake clang
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get -o Dpkg::Use-Pty=0 update
sudo rm -f /var/lib/man-db/auto-update
sudo apt-get -o Dpkg::Use-Pty=0 install -y cmake clang ninja-build
- name: Compile mainline
run: |
./mainline.sh
env:
# test with different "sanitizers"
SANITIZER: ${{ matrix.sanitizer }}
run: ./mainline.sh

just_dependencies:
runs-on: ubuntu-latest
Expand All @@ -115,8 +116,10 @@ jobs:
repository: curl/curl-fuzzer
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake clang
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get -o Dpkg::Use-Pty=0 update
sudo rm -f /var/lib/man-db/auto-update
sudo apt-get -o Dpkg::Use-Pty=0 install -y cmake clang ninja-build
- name: Compile deps target
run: ./scripts/compile_target.sh deps

Expand Down
144 changes: 64 additions & 80 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,47 +1,51 @@
cmake_minimum_required(VERSION 3.11)
project(curl_fuzzer_deps)

if(NOT "$ENV{MAKE}" STREQUAL "")
set(MAKE "$ENV{MAKE}")
else()
set(MAKE "make")
endif()

include(ExternalProject)

# Install zlib
#
# renovate: datasource=github-tags depName=madler/zlib
set(ZLIB_VERSION 1.3.1)
set(ZLIB_URL https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_URL https://zlib.net/zlib-${ZLIB_VERSION}.tar.xz)
set(ZLIB_INSTALL_DIR ${CMAKE_BINARY_DIR}/zlib-install)
set(ZLIB_STATIC_LIB ${ZLIB_INSTALL_DIR}/lib/libz.a)

ExternalProject_Add(
zlib_external
URL ${ZLIB_URL}
PREFIX ${CMAKE_BINARY_DIR}/zlib
SOURCE_SUBDIR .
CONFIGURE_COMMAND <SOURCE_DIR>/configure --static --prefix=${ZLIB_INSTALL_DIR}
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
BUILD_IN_SOURCE 1
BUILD_BYPRODUCTS ${ZLIB_STATIC_LIB}
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
DOWNLOAD_NO_PROGRESS 1
)
set(ZLIB_STATIC_LIB ${ZLIB_INSTALL_DIR}/lib/libz.a)

# Install zstd
#
# renovate: datasource=github-tags depName=facebook/zstd
set(ZSTD_VERSION 1.5.7)
set(ZSTD_URL https://github.com/facebook/zstd/releases/download/v${ZSTD_VERSION}/zstd-${ZSTD_VERSION}.tar.gz)
set(ZSTD_INSTALL_DIR ${CMAKE_BINARY_DIR}/zstd-install)
set(ZSTD_STATIC_LIB ${ZSTD_INSTALL_DIR}/lib/libzstd.a)

ExternalProject_Add(
zstd_external
URL ${ZSTD_URL}
PREFIX ${CMAKE_BINARY_DIR}/zstd
SOURCE_SUBDIR build/cmake
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${ZSTD_INSTALL_DIR} -DZSTD_BUILD_PROGRAMS=OFF -DZSTD_BUILD_SHARED=OFF -DZSTD_BUILD_STATIC=ON
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
BUILD_IN_SOURCE 0
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${ZSTD_INSTALL_DIR} -DZSTD_BUILD_PROGRAMS=OFF -DZSTD_BUILD_SHARED=OFF -DZSTD_BUILD_STATIC=ON -DZSTD_BUILD_CONTRIB=OFF -DZSTD_BUILD_TESTS=OFF
BUILD_BYPRODUCTS ${ZSTD_STATIC_LIB}
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
DOWNLOAD_NO_PROGRESS 1
)
set(ZSTD_STATIC_LIB ${ZSTD_INSTALL_DIR}/lib/libzstd.a)

# For the memory sanitizer build, turn off OpenSSL as it causes bugs we can't
# affect (see 16697, 17624)
Expand All @@ -54,6 +58,7 @@ if(NOT (DEFINED ENV{SANITIZER} AND "$ENV{SANITIZER}" STREQUAL "memory"))
set(OPENSSL_URL https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz)
set(OPENSSL_INSTALL_DIR ${CMAKE_BINARY_DIR}/openssl-install)
set(OPENSSL_SRC_DIR ${CMAKE_BINARY_DIR}/openssl/src/openssl_external)
set(OPENSSL_STATIC_LIB ${OPENSSL_INSTALL_DIR}/lib/libssl.a ${OPENSSL_INSTALL_DIR}/lib/libcrypto.a)

# Architecture and sanitizer logic
set(OPENSSL_ARCH_TARGET "")
Expand Down Expand Up @@ -81,6 +86,8 @@ if(NOT (DEFINED ENV{SANITIZER} AND "$ENV{SANITIZER}" STREQUAL "memory"))
-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
no-shared
no-tests
no-apps
no-makedepend
${OPENSSL_ASM_FLAG}
${OPENSSL_ARCH_FLAG}
enable-tls1_3
Expand All @@ -100,26 +107,25 @@ if(NOT (DEFINED ENV{SANITIZER} AND "$ENV{SANITIZER}" STREQUAL "memory"))
openssl_external
URL ${OPENSSL_URL}
PREFIX ${CMAKE_BINARY_DIR}/openssl
SOURCE_SUBDIR .
CONFIGURE_COMMAND ${OPENSSL_CONFIGURE_COMMAND}
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install_sw
INSTALL_COMMAND ${MAKE} install_sw
BUILD_IN_SOURCE 1
BUILD_BYPRODUCTS ${OPENSSL_STATIC_LIB}
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
DOWNLOAD_NO_PROGRESS 1
)

# Build zlib before openssl
add_dependencies(openssl_external zlib_external)

# Set the OpenSSL option for nghttp2
set(NGHTTP2_OPENSSL_OPTION --with-openssl=${OPENSSL_INSTALL_DIR})
set(NGHTTP2_OPENSSL_OPTION -DOPENSSL_ROOT_DIR=${OPENSSL_INSTALL_DIR})

# Set the dependency option for openssl
set(OPENSSL_DEP openssl_external)
set(OPENSSL_STATIC_LIB ${OPENSSL_INSTALL_DIR}/lib/libssl.a ${OPENSSL_INSTALL_DIR}/lib/libcrypto.a)
else()
message(STATUS "Not building OpenSSL")
set(NGHTTP2_OPENSSL_OPTION --without-openssl)
set(NGHTTP2_OPENSSL_OPTION -DOPENSSL_INCLUDE_DIR=)
set(OPENSSL_DEP "")
set(OPENSSL_STATIC_LIB "")
endif()
Expand All @@ -128,32 +134,20 @@ endif()
#
# renovate: datasource=github-tags depName=nghttp2/nghttp2
set(NGHTTP2_VERSION 1.66.0)
set(NGHTTP2_URL https://github.com/nghttp2/nghttp2/releases/download/v${NGHTTP2_VERSION}/nghttp2-${NGHTTP2_VERSION}.tar.gz)
set(NGHTTP2_URL https://github.com/nghttp2/nghttp2/releases/download/v${NGHTTP2_VERSION}/nghttp2-${NGHTTP2_VERSION}.tar.xz)
set(NGHTTP2_INSTALL_DIR ${CMAKE_BINARY_DIR}/nghttp2-install)

set(NGHTTP2_CONFIGURE_COMMAND
autoreconf -i &&
./configure --prefix=${NGHTTP2_INSTALL_DIR}
--disable-shared
--enable-static
--disable-threads
--enable-lib-only
--with-zlib=${ZLIB_INSTALL_DIR}
${NGHTTP2_OPENSSL_OPTION}
)
set(NGHTTP2_STATIC_LIB ${NGHTTP2_INSTALL_DIR}/lib/libnghttp2.a)

ExternalProject_Add(
nghttp2_external
URL ${NGHTTP2_URL}
PREFIX ${CMAKE_BINARY_DIR}/nghttp2
SOURCE_SUBDIR .
CONFIGURE_COMMAND ${NGHTTP2_CONFIGURE_COMMAND}
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
BUILD_IN_SOURCE 1
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${NGHTTP2_INSTALL_DIR} -DENABLE_LIB_ONLY=ON -DENABLE_THREADS=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF
-DBUILD_TESTING=OFF -DENABLE_DOC=OFF ${NGHTTP2_OPENSSL_OPTION}
BUILD_BYPRODUCTS ${NGHTTP2_STATIC_LIB}
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
DOWNLOAD_NO_PROGRESS 1
)
set(NGHTTP2_STATIC_LIB ${NGHTTP2_INSTALL_DIR}/lib/libnghttp2.a)

# Ensure zlib and openssl are built before nghttp2
add_dependencies(nghttp2_external ${OPENSSL_DEP} zlib_external)
Expand All @@ -164,19 +158,18 @@ add_dependencies(nghttp2_external ${OPENSSL_DEP} zlib_external)
set(LIBIDN2_VERSION 2.3.8)
set(LIBIDN2_URL https://ftp.gnu.org/gnu/libidn/libidn2-${LIBIDN2_VERSION}.tar.gz)
set(LIBIDN2_INSTALL_DIR ${CMAKE_BINARY_DIR}/libidn2-install)
set(LIBIDN2_STATIC_LIB ${LIBIDN2_INSTALL_DIR}/lib/libidn2.a)

ExternalProject_Add(
libidn2_external
URL ${LIBIDN2_URL}
PREFIX ${CMAKE_BINARY_DIR}/libidn2
SOURCE_SUBDIR .
CONFIGURE_COMMAND ./configure --prefix=${LIBIDN2_INSTALL_DIR} --disable-shared --enable-static
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
CONFIGURE_COMMAND ./configure --disable-dependency-tracking --prefix=${LIBIDN2_INSTALL_DIR} --disable-shared --enable-static --disable-doc
BUILD_IN_SOURCE 1
BUILD_BYPRODUCTS ${LIBIDN2_STATIC_LIB}
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
DOWNLOAD_NO_PROGRESS 1
)
set(LIBIDN2_STATIC_LIB ${LIBIDN2_INSTALL_DIR}/lib/libidn2.a)

# Install GDB if GDBMODE is set
set(GDB_VERSION 13.2)
Expand All @@ -189,10 +182,7 @@ if(BUILD_GDB)
gdb_external
URL ${GDB_URL}
PREFIX ${CMAKE_BINARY_DIR}/gdb
SOURCE_SUBDIR .
CONFIGURE_COMMAND ./configure --prefix=${GDB_INSTALL_DIR}
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
CONFIGURE_COMMAND ./configure --disable-dependency-tracking --prefix=${GDB_INSTALL_DIR}
BUILD_IN_SOURCE 1
)
set(GDB_DEP gdb_external)
Expand All @@ -204,20 +194,19 @@ endif()
set(OPENLDAP_VERSION 2.6.10)
set(OPENLDAP_URL https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-${OPENLDAP_VERSION}.tgz)
set(OPENLDAP_INSTALL_DIR ${CMAKE_BINARY_DIR}/openldap-install)
set(OPENLDAP_STATIC_LIB_LDAP ${OPENLDAP_INSTALL_DIR}/lib/libldap.a)
set(OPENLDAP_STATIC_LIB_LBER ${OPENLDAP_INSTALL_DIR}/lib/liblber.a)

ExternalProject_Add(
openldap_external
URL ${OPENLDAP_URL}
PREFIX ${CMAKE_BINARY_DIR}/openldap
SOURCE_SUBDIR .
CONFIGURE_COMMAND ./configure --prefix=${OPENLDAP_INSTALL_DIR} --disable-shared --enable-static --without-tls
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
BUILD_IN_SOURCE 1
BUILD_BYPRODUCTS ${OPENLDAP_STATIC_LIB_LDAP} ${OPENLDAP_STATIC_LIB_LBER}
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
DOWNLOAD_NO_PROGRESS 1
)
set(OPENLDAP_STATIC_LIB_LDAP ${OPENLDAP_INSTALL_DIR}/lib/libldap.a)
set(OPENLDAP_STATIC_LIB_LBER ${OPENLDAP_INSTALL_DIR}/lib/liblber.a)

if (TARGET openssl_external)
add_dependencies(openldap_external openssl_external)
Expand All @@ -244,32 +233,30 @@ set(CURL_INSTALL_DIR ${CMAKE_BINARY_DIR}/curl-install)

# Determine SSL and nghttp2 options
if(TARGET openssl_external)
set(CURL_SSL_OPTION "--with-ssl=${OPENSSL_INSTALL_DIR}")
set(CURL_SSL_OPTION -DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR=${OPENSSL_INSTALL_DIR})
else()
set(CURL_SSL_OPTION "--without-ssl")
set(CURL_SSL_OPTION -DCURL_USE_OPENSSL=OFF)
endif()

set(CURL_CONFIGURE_COMMAND
autoreconf -fi &&
./configure
--prefix=${CURL_INSTALL_DIR}
--disable-shared
--enable-debug
--enable-maintainer-mode
--disable-symbol-hiding
--disable-docs
--enable-ipv6
--enable-websockets
--without-libpsl
--with-random=/dev/null
${CURL_SSL_OPTION}
--with-zlib=${ZLIB_INSTALL_DIR}
--with-nghttp2=${NGHTTP2_INSTALL_DIR}
--with-zstd=${ZSTD_INSTALL_DIR}
--with-libidn2=${LIBIDN2_INSTALL_DIR}
--with-ldap=${OPENLDAP_INSTALL_DIR}
--with-ldap-lib=ldap
--with-lber-lib=lber
set(CURL_CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${CURL_INSTALL_DIR}
-DBUILD_SHARED_LIBS=OFF
-DENABLE_DEBUG=ON
-DCURL_HIDDEN_SYMBOLS=OFF
-DBUILD_CURL_EXE=OFF -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF
-DCURL_USE_LIBPSL=OFF
${CURL_SSL_OPTION}
-DZLIB_INCLUDE_DIR=${ZLIB_INSTALL_DIR}/include
-DZLIB_LIBRARY=${ZLIB_STATIC_LIB}
-DNGHTTP2_INCLUDE_DIR=${NGHTTP2_INSTALL_DIR}/include
-DNGHTTP2_LIBRARY=${NGHTTP2_STATIC_LIB}
-DZSTD_INCLUDE_DIR=${ZSTD_INSTALL_DIR}/include
-DZSTD_LIBRARY=${ZSTD_STATIC_LIB}
-DLIBIDN2_INCLUDE_DIR=${LIBIDN2_INSTALL_DIR}/include
-DLIBIDN2_LIBRARY=${LIBIDN2_STATIC_LIB}
-DLDAP_INCLUDE_DIR=${OPENLDAP_INSTALL_DIR}/include
-DLDAP_LIBRARY=${OPENLDAP_STATIC_LIB_LDAP}
-DLDAP_LBER_LIBRARY=${OPENLDAP_STATIC_LIB_LBER}
)

set(CURL_POST_INSTALL_COMMAND
Expand All @@ -287,11 +274,10 @@ if (DEFINED ENV{CURL_SOURCE_DIR})
ExternalProject_Add(
curl_external
SOURCE_DIR $ENV{CURL_SOURCE_DIR}
CONFIGURE_COMMAND ${CURL_CONFIGURE_COMMAND}
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
PATCH_COMMAND ${CMAKE_COMMAND} -E echo "pre-build commands"
${CURL_POST_INSTALL_COMMAND}
BUILD_IN_SOURCE 1
CMAKE_ARGS ${CURL_CMAKE_ARGS}
BUILD_BYPRODUCTS ${CURL_INSTALL_DIR}/lib/libcurl.a
)
else()
message(STATUS "Building curl from git master")
Expand All @@ -301,12 +287,10 @@ else()
GIT_REPOSITORY ${CURL_URL}
GIT_SHALLOW 1
PREFIX ${CMAKE_BINARY_DIR}/curl
CONFIGURE_COMMAND ${CURL_CONFIGURE_COMMAND}
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
PATCH_COMMAND ${CMAKE_COMMAND} -E echo "pre-build commands"
${CURL_POST_INSTALL_COMMAND}
BUILD_IN_SOURCE 1
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
CMAKE_ARGS ${CURL_CMAKE_ARGS}
BUILD_BYPRODUCTS ${CURL_INSTALL_DIR}/lib/libcurl.a
)
endif()

Expand Down
Empty file modified fuzz_fnmatch.cc
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion generate_fnmatch.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

# Redirect the output of this script to a test file.
printf "$1\0$2\0"
printf "$1\0$2\0"
9 changes: 0 additions & 9 deletions ossfuzz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,8 @@ SCRIPTDIR=${BUILD_ROOT}/scripts
GDBDIR=/src/gdb

echo "BUILD_ROOT: $BUILD_ROOT"
echo "SRC: ${SRC:-undefined}"
echo "CC: $CC"
echo "CXX: $CXX"
echo "LIB_FUZZING_ENGINE: $LIB_FUZZING_ENGINE"
echo "CFLAGS: $CFLAGS"
echo "CXXFLAGS: $CXXFLAGS"
echo "ARCHITECTURE: $ARCHITECTURE"
echo "FUZZ_TARGETS: $FUZZ_TARGETS"

export MAKEFLAGS+="-j$(nproc)"

# Set the CURL_SOURCE_DIR for the build.
export CURL_SOURCE_DIR=/src/curl

Expand Down
8 changes: 6 additions & 2 deletions scripts/compile_target.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,18 @@ else
CMAKE_VERBOSE_FLAG=""
fi

export MAKEFLAGS+="-j$(nproc)"
export MAKEFLAGS; MAKEFLAGS+=" -s -j$(($(nproc) + 0))"
echo "MAKEFLAGS: ${MAKEFLAGS}"

# Create a build directory for the dependencies.
BUILD_DIR=${BUILD_ROOT}/build
mkdir -p ${BUILD_DIR}

options=''
command -v ninja >/dev/null 2>&1 && options+=' -G Ninja'

# Compile the dependencies.
pushd ${BUILD_DIR}
cmake ${CMAKE_GDB_FLAG} ..
cmake ${CMAKE_GDB_FLAG} .. ${options}
cmake --build . --target ${TARGET} ${CMAKE_VERBOSE_FLAG}
popd
7 changes: 2 additions & 5 deletions scripts/ossfuzzdeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,5 @@ $SUDO apt-get -o Dpkg::Use-Pty=0 install -y \
pkg-config \
wget \
cmake \
ninja-build

# for openldap to avoid installing groff-base
$SUDO touch /usr/bin/soelim
$SUDO chmod +x /usr/bin/soelim
ninja-build \
groff-base