File tree Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -60,21 +60,23 @@ RUN set -ex; \
60
60
ninja install/strip; \
61
61
rm -rf /usr/src/z3
62
62
63
- # OSSFUZZ: LPM package (do not remove build dirs as solidity compiles/links against that dir)
63
+ # OSSFUZZ: libprotobuf-mutator
64
64
RUN set -ex; \
65
- mkdir /src; \
66
- cd /src; \
67
- git clone https://github.com/google/libprotobuf-mutator.git; \
68
- cd libprotobuf-mutator; \
65
+ git clone https://github.com/google/libprotobuf-mutator.git \
66
+ /usr/src/libprotobuf-mutator; \
67
+ cd /usr/src/libprotobuf-mutator; \
69
68
git checkout d1fe8a7d8ae18f3d454f055eba5213c291986f21; \
70
- mkdir ../LPM; \
71
- cd ../LPM; \
72
- cmake ../libprotobuf-mutator -GNinja -DLIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF=ON -DLIB_PROTO_MUTATOR_TESTING=OFF -DCMAKE_BUILD_TYPE=Release; \
69
+ mkdir build; \
70
+ cd build; \
71
+ cmake .. -GNinja -DLIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF=ON \
72
+ -DLIB_PROTO_MUTATOR_TESTING=OFF -DCMAKE_BUILD_TYPE=Release \
73
+ -DCMAKE_INSTALL_PREFIX="/usr" ; \
73
74
ninja; \
74
75
cp -vpr external.protobuf/bin/* /usr/bin/; \
75
76
cp -vpr external.protobuf/include/* /usr/include/; \
76
77
cp -vpr external.protobuf/lib/* /usr/lib/; \
77
- ninja install/strip
78
+ ninja install/strip; \
79
+ rm -rf /usr/src/libprotobuf-mutator
78
80
79
81
# OSSFUZZ: libfuzzer
80
82
RUN set -ex; \
Original file line number Diff line number Diff line change 1
- if (OSSFUZZ)
2
- link_directories (/src/LPM/src /src/LPM/src/libfuzzer /src/LPM/external.protobuf/lib)
3
- endif ()
4
1
add_custom_target (ossfuzz)
5
2
add_dependencies (ossfuzz
6
3
solc_opt_ossfuzz
@@ -37,15 +34,15 @@ if (OSSFUZZ)
37
34
target_link_libraries (strictasm_assembly_ossfuzz PRIVATE yul FuzzingEngine.a)
38
35
39
36
add_executable (yul_proto_ossfuzz yulProtoFuzzer.cpp protoToYul.cpp yulProto.pb.cc)
40
- target_include_directories (yul_proto_ossfuzz PRIVATE /src/ libprotobuf-mutator /src/LPM/external.protobuf/ include )
37
+ target_include_directories (yul_proto_ossfuzz PRIVATE /usr/ include / libprotobuf-mutator)
41
38
target_link_libraries (yul_proto_ossfuzz PRIVATE yul
42
39
protobuf-mutator-libfuzzer.a
43
40
protobuf-mutator.a
44
41
protobuf.a
45
42
FuzzingEngine.a)
46
43
47
44
add_executable (yul_proto_diff_ossfuzz yulProto_diff_ossfuzz.cpp yulFuzzerCommon.cpp protoToYul.cpp yulProto.pb.cc)
48
- target_include_directories (yul_proto_diff_ossfuzz PRIVATE /src/ libprotobuf-mutator /src/LPM/external.protobuf/ include )
45
+ target_include_directories (yul_proto_diff_ossfuzz PRIVATE /usr/ include / libprotobuf-mutator)
49
46
target_link_libraries (yul_proto_diff_ossfuzz PRIVATE yul
50
47
yulInterpreter
51
48
protobuf-mutator-libfuzzer.a
You can’t perform that action at this time.
0 commit comments