Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
38718ccc
Commit
38718ccc
authored
Apr 14, 2021
by
Evgeny Vereshchagin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build-system: add --enable-fuzzers
Signed-off-by:
Evgeny Vereshchagin
<
evvers@ya.ru
>
parent
b9f3cd48
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
configure.ac
configure.ac
+16
-0
Makefile.am
src/tests/Makefile.am
+21
-0
No files found.
configure.ac
View file @
38718ccc
...
@@ -62,6 +62,7 @@ if test "x$valid_compiler" = "xno"; then
...
@@ -62,6 +62,7 @@ if test "x$valid_compiler" = "xno"; then
fi
fi
AC_PROG_GCC_TRADITIONAL
AC_PROG_GCC_TRADITIONAL
AC_PROG_CXX
AC_ENABLE_SHARED
AC_ENABLE_SHARED
AC_ENABLE_STATIC
AC_ENABLE_STATIC
# Check binaries
# Check binaries
...
@@ -205,6 +206,13 @@ AC_ARG_ENABLE([no_undefined],
...
@@ -205,6 +206,13 @@ AC_ARG_ENABLE([no_undefined],
[enable_no_undefined=$enableval], [enable_no_undefined=yes])
[enable_no_undefined=$enableval], [enable_no_undefined=yes])
AM_CONDITIONAL([ENABLE_NO_UNDEFINED], [test "x$enable_no_undefined" = "xyes"])
AM_CONDITIONAL([ENABLE_NO_UNDEFINED], [test "x$enable_no_undefined" = "xyes"])
AC_ARG_ENABLE([fuzzers],
[AS_HELP_STRING([--enable-fuzzers], [compile with fuzzers])],
[enable_fuzzers=$enableval], [enable_fuzzers=no])
AM_CONDITIONAL([ENABLE_FUZZERS], [test "x$enable_fuzzers" = "xyes"])
AM_CONDITIONAL([OSS_FUZZ], [test "x$LIB_FUZZING_ENGINE" != x])
# Allow disabling rpath
# Allow disabling rpath
AC_ARG_ENABLE([rpath],
AC_ARG_ENABLE([rpath],
[AS_HELP_STRING([--enable-rpath], [set rpath in executables [default=no]])],
[AS_HELP_STRING([--enable-rpath], [set rpath in executables [default=no]])],
...
@@ -476,6 +484,13 @@ else
...
@@ -476,6 +484,13 @@ else
AC_MSG_RESULT([no])
AC_MSG_RESULT([no])
fi
fi
if test "x$enable_fuzzers" = "xyes" -a "x$LIB_FUZZING_ENGINE" = x; then
CC_CHECK_FLAGS_APPEND([AM_CFLAGS],[CFLAGS],[ \
-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION \
-fsanitize=fuzzer-no-link])
AC_SUBST(AM_CFLAGS)
fi
# Optional test binaries
# Optional test binaries
AC_ARG_ENABLE([tests],
AC_ARG_ENABLE([tests],
[AS_HELP_STRING([--enable-tests], [build test/example binaries [default=no]])],
[AS_HELP_STRING([--enable-tests], [build test/example binaries [default=no]])],
...
@@ -1124,6 +1139,7 @@ Debugging:
...
@@ -1124,6 +1139,7 @@ Debugging:
- Coverity: $enable_coverity_build
- Coverity: $enable_coverity_build
- mutex debugging: $enable_mutex_debugging
- mutex debugging: $enable_mutex_debugging
- tests: $enable_tests
- tests: $enable_tests
- fuzzers: $enable_fuzzers
Paths:
Paths:
- Logs in configpath: $enable_configpath_log
- Logs in configpath: $enable_configpath_log
...
...
src/tests/Makefile.am
View file @
38718ccc
...
@@ -791,6 +791,27 @@ bin_SCRIPTS += lxc-test-lxc-attach \
...
@@ -791,6 +791,27 @@ bin_SCRIPTS += lxc-test-lxc-attach \
endif
endif
endif
endif
if
ENABLE_FUZZERS
LIB_FUZZING_ENGINE
?=
-fsanitize
=
fuzzer
# https://google.github.io/oss-fuzz/getting-started/new-project-guide/#Requirements
nodist_EXTRA_fuzz_lxc_config_read_SOURCES
=
dummy.cxx
fuzz_lxc_config_read_SOURCES
=
fuzz-lxc-config-read.c
fuzz_lxc_config_read_CFLAGS
=
$(AM_CFLAGS)
fuzz_lxc_config_read_CXXFLAGS
=
$(AM_CFLAGS)
fuzz_lxc_config_read_LDFLAGS
=
$(AM_LDFLAGS)
-static
fuzz_lxc_config_read_LDADD
=
$(LDADD)
$(LIB_FUZZING_ENGINE)
nodist_EXTRA_fuzz_lxc_define_load_SOURCES
=
dummy.cxx
fuzz_lxc_define_load_SOURCES
=
fuzz-lxc-define-load.c
fuzz_lxc_define_load_CFLAGS
=
$(AM_CFLAGS)
fuzz_lxc_define_load_CXXFLAGS
=
$(AM_CFLAGS)
fuzz_lxc_define_load_LDFLAGS
=
$(AM_LDFLAGS)
-static
fuzz_lxc_define_load_LDADD
=
$(LDADD)
$(LIB_FUZZING_ENGINE)
bin_PROGRAMS
+=
fuzz-lxc-config-read
\
fuzz-lxc-define-load
endif
endif
endif
EXTRA_DIST
=
basic.c
\
EXTRA_DIST
=
basic.c
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment