Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion jerry-main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ endmacro()
# Jerry with libfuzzer support
if(JERRY_LIBFUZZER)
jerry_create_executable("jerry-libfuzzer" "libfuzzer.c")
target_link_libraries("jerry-libfuzzer" jerry-port-default -fsanitize=fuzzer)
if(JERRY_OSS_FUZZ)
target_link_libraries("jerry-libfuzzer" jerry-port-default)
else()
target_link_libraries("jerry-libfuzzer" jerry-port-default -fsanitize=fuzzer)
endif()
endif()

# Jerry standalones
Expand Down
3 changes: 3 additions & 0 deletions tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ def devhelp(helpstring):
help=devhelp('build test version of the jerry command line tool (%(choices)s)'))
compgrp.add_argument('--libfuzzer', metavar='X', choices=['ON', 'OFF'], type=str.upper,
help=devhelp('build jerry with libfuzzer support (%(choices)s)'))
compgrp.add_argument('--oss-fuzz', metavar='X', choices=['ON', 'OFF'], type=str.upper,
help=devhelp('build jerry to run on OSS-fuzz (%(choices)s)'))
compgrp.add_argument('--jerry-ext', metavar='X', choices=['ON', 'OFF'], type=str.upper,
help='build jerry-ext (%(choices)s)')
compgrp.add_argument('--jerry-libm', metavar='X', choices=['ON', 'OFF'], type=str.upper,
Expand Down Expand Up @@ -188,6 +190,7 @@ def build_options_append(cmakeopt, cliarg):
build_options_append('JERRY_CMDLINE_SNAPSHOT', arguments.jerry_cmdline_snapshot)
build_options_append('JERRY_CMDLINE_TEST', arguments.jerry_cmdline_test)
build_options_append('JERRY_LIBFUZZER', arguments.libfuzzer)
build_options_append('JERRY_OSS_FUZZ', arguments.oss_fuzz)
build_options_append('JERRY_EXT', arguments.jerry_ext)
build_options_append('JERRY_LIBM', arguments.jerry_libm)
build_options_append('JERRY_PORT_DEFAULT', arguments.jerry_port_default)
Expand Down