Skip to content

Commit

Permalink
Merge pull request ethereum#13622 from ethereum/fix-failing-build
Browse files Browse the repository at this point in the history
Silence integer precision loss warning for protobuf fuzzers.
  • Loading branch information
cameel authored Oct 20, 2022
2 parents db54e04 + 898fbe9 commit 720db45
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions test/tools/ossfuzz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ if (OSSFUZZ)
protobuf.a
)
set_target_properties(yul_proto_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
target_compile_options(yul_proto_ossfuzz PUBLIC ${COMPILE_OPTIONS} -Wno-sign-conversion -Wno-suggest-destructor-override -Wno-inconsistent-missing-destructor-override)
# The -Wno-* compile options are required for source files that
# are auto-generated by the protobuf compiler because the compiler
# does not generate warning-free C++ bindings with regard to
# upstream Clang builds that are used by ossfuzz.
target_compile_options(yul_proto_ossfuzz PUBLIC ${COMPILE_OPTIONS} -Wno-sign-conversion -Wno-suggest-destructor-override -Wno-inconsistent-missing-destructor-override -Wno-shorten-64-to-32)

add_executable(
yul_proto_diff_ossfuzz
Expand All @@ -88,7 +92,7 @@ if (OSSFUZZ)
protobuf.a
)
set_target_properties(yul_proto_diff_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
target_compile_options(yul_proto_diff_ossfuzz PUBLIC ${COMPILE_OPTIONS} -Wno-sign-conversion -Wno-suggest-destructor-override -Wno-inconsistent-missing-destructor-override)
target_compile_options(yul_proto_diff_ossfuzz PUBLIC ${COMPILE_OPTIONS} -Wno-sign-conversion -Wno-suggest-destructor-override -Wno-inconsistent-missing-destructor-override -Wno-shorten-64-to-32)

add_executable(yul_proto_diff_custom_mutate_ossfuzz
yulProto_diff_ossfuzz.cpp
Expand All @@ -106,7 +110,7 @@ if (OSSFUZZ)
protobuf.a
)
set_target_properties(yul_proto_diff_custom_mutate_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
target_compile_options(yul_proto_diff_custom_mutate_ossfuzz PUBLIC ${COMPILE_OPTIONS} -Wno-sign-conversion -Wno-suggest-destructor-override -Wno-inconsistent-missing-destructor-override)
target_compile_options(yul_proto_diff_custom_mutate_ossfuzz PUBLIC ${COMPILE_OPTIONS} -Wno-sign-conversion -Wno-suggest-destructor-override -Wno-inconsistent-missing-destructor-override -Wno-shorten-64-to-32)

add_executable(stack_reuse_codegen_ossfuzz
StackReuseCodegenFuzzer.cpp
Expand All @@ -131,6 +135,7 @@ if (OSSFUZZ)
-Wno-unused-parameter
-Wno-zero-length-array
-Wno-suggest-destructor-override
-Wno-shorten-64-to-32
)

add_executable(abiv2_proto_ossfuzz
Expand All @@ -151,7 +156,7 @@ if (OSSFUZZ)
protobuf.a
)
set_target_properties(abiv2_proto_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
target_compile_options(abiv2_proto_ossfuzz PUBLIC ${COMPILE_OPTIONS} -Wno-sign-conversion -Wno-suggest-destructor-override -Wno-inconsistent-missing-destructor-override)
target_compile_options(abiv2_proto_ossfuzz PUBLIC ${COMPILE_OPTIONS} -Wno-sign-conversion -Wno-suggest-destructor-override -Wno-inconsistent-missing-destructor-override -Wno-shorten-64-to-32)

add_executable(abiv2_isabelle_ossfuzz
AbiV2IsabelleFuzzer.cpp
Expand All @@ -173,7 +178,7 @@ if (OSSFUZZ)
gmp.a
)
set_target_properties(abiv2_isabelle_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
target_compile_options(abiv2_isabelle_ossfuzz PUBLIC ${COMPILE_OPTIONS} -Wno-sign-conversion -Wno-suggest-destructor-override -Wno-inconsistent-missing-destructor-override)
target_compile_options(abiv2_isabelle_ossfuzz PUBLIC ${COMPILE_OPTIONS} -Wno-sign-conversion -Wno-suggest-destructor-override -Wno-inconsistent-missing-destructor-override -Wno-shorten-64-to-32)

add_executable(sol_proto_ossfuzz
solProtoFuzzer.cpp
Expand All @@ -193,7 +198,7 @@ if (OSSFUZZ)
protobuf.a
)
set_target_properties(sol_proto_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
target_compile_options(sol_proto_ossfuzz PUBLIC ${COMPILE_OPTIONS} -Wno-sign-conversion -Wno-suggest-destructor-override -Wno-inconsistent-missing-destructor-override)
target_compile_options(sol_proto_ossfuzz PUBLIC ${COMPILE_OPTIONS} -Wno-sign-conversion -Wno-suggest-destructor-override -Wno-inconsistent-missing-destructor-override -Wno-shorten-64-to-32)
else()
add_library(solc_ossfuzz
solc_ossfuzz.cpp
Expand Down

0 comments on commit 720db45

Please sign in to comment.