targets.gyp (6893B)
1 # This Source Code Form is subject to the terms of the Mozilla Public 2 # License, v. 2.0. If a copy of the MPL was not distributed with this 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 { 5 'includes': [ 6 '../../coreconf/config.gypi', 7 ], 8 'target_defaults': { 9 'variables': { 10 'debug_optimization_level': '3', 11 }, 12 'target_conditions': [ 13 [ '_type=="executable"', { 14 'libraries!': [ 15 '<@(nspr_libs)', 16 ], 17 'libraries': [ 18 '<(nss_dist_obj_dir)/lib/libplds4.a', 19 '<(nss_dist_obj_dir)/lib/libnspr4.a', 20 '<(nss_dist_obj_dir)/lib/libplc4.a', 21 ], 22 }], 23 ], 24 }, 25 'targets': [ 26 { 27 'target_name': 'nssfuzz_base', 28 'type': 'none', 29 'dependencies': [ 30 '<(DEPTH)/lib/certdb/certdb.gyp:certdb', 31 '<(DEPTH)/lib/certhigh/certhigh.gyp:certhi', 32 '<(DEPTH)/lib/cryptohi/cryptohi.gyp:cryptohi', 33 '<(DEPTH)/lib/ssl/ssl.gyp:ssl', 34 '<(DEPTH)/lib/base/base.gyp:nssb', 35 '<(DEPTH)/lib/dev/dev.gyp:nssdev', 36 '<(DEPTH)/lib/pki/pki.gyp:nsspki', 37 '<(DEPTH)/lib/util/util.gyp:nssutil', 38 '<(DEPTH)/lib/nss/nss.gyp:nss_static', 39 '<(DEPTH)/lib/pkcs7/pkcs7.gyp:pkcs7', 40 '<(DEPTH)/lib/pkcs12/pkcs12.gyp:pkcs12', 41 '<(DEPTH)/lib/smime/smime.gyp:smime', 42 # This is a static build of pk11wrap, softoken, and freebl. 43 '<(DEPTH)/lib/pk11wrap/pk11wrap.gyp:pk11wrap_static', 44 '<(DEPTH)/lib/libpkix/libpkix.gyp:libpkix', 45 ], 46 'direct_dependent_settings': { 47 'include_dirs': [ '<(DEPTH)/fuzz/targets/lib' ], 48 }, 49 'conditions': [ 50 ['fuzz_oss==0', { 51 'all_dependent_settings': { 52 'libraries': [ 53 '-fsanitize=fuzzer', 54 ], 55 } 56 }, { 57 'all_dependent_settings': { 58 'libraries': [ '-lFuzzingEngine' ], 59 } 60 }] 61 ], 62 }, 63 { 64 'target_name': 'nssfuzz-asn1', 65 'type': 'executable', 66 'sources': [ 67 'asn1.cc', 68 ], 69 'dependencies': [ 70 '<(DEPTH)/exports.gyp:nss_exports', 71 '<(DEPTH)/fuzz/targets/lib/asn1/asn1.gyp:asn1', 72 '<(DEPTH)/fuzz/targets/lib/base/base.gyp:base', 73 'nssfuzz_base', 74 ], 75 }, 76 { 77 'target_name': 'nssfuzz-certDN', 78 'type': 'executable', 79 'sources': [ 80 'certDN.cc', 81 ], 82 'dependencies': [ 83 '<(DEPTH)/cpputil/cpputil.gyp:cpputil', 84 '<(DEPTH)/exports.gyp:nss_exports', 85 'nssfuzz_base', 86 ], 87 }, 88 { 89 'target_name': 'nssfuzz-dtls-client', 90 'type': 'executable', 91 'sources': [ 92 'tls_client.cc', 93 ], 94 'defines': [ 'IS_DTLS_FUZZ' ], 95 'dependencies': [ 96 '<(DEPTH)/cpputil/cpputil.gyp:cpputil', 97 '<(DEPTH)/exports.gyp:nss_exports', 98 '<(DEPTH)/fuzz/targets/lib/base/base.gyp:base', 99 '<(DEPTH)/fuzz/targets/lib/tls/tls.gyp:tls_client', 100 'nssfuzz_base', 101 ], 102 }, 103 { 104 'target_name': 'nssfuzz-dtls-server', 105 'type': 'executable', 106 'sources': [ 107 'tls_server.cc', 108 ], 109 'defines': [ 'IS_DTLS_FUZZ' ], 110 'dependencies': [ 111 '<(DEPTH)/cpputil/cpputil.gyp:cpputil', 112 '<(DEPTH)/exports.gyp:nss_exports', 113 '<(DEPTH)/fuzz/targets/lib/base/base.gyp:base', 114 '<(DEPTH)/fuzz/targets/lib/tls/tls.gyp:tls_server', 115 'nssfuzz_base', 116 ], 117 }, 118 { 119 'target_name': 'nssfuzz-ech', 120 'type': 'executable', 121 'sources': [ 122 'ech.cc', 123 ], 124 'dependencies': [ 125 '<(DEPTH)/exports.gyp:nss_exports', 126 '<(DEPTH)/cpputil/cpputil.gyp:cpputil', 127 '<(DEPTH)/fuzz/targets/lib/tls/tls.gyp:base', 128 'nssfuzz_base', 129 ], 130 }, 131 { 132 'target_name': 'nssfuzz-pkcs7', 133 'type': 'executable', 134 'sources': [ 135 'pkcs7.cc', 136 ], 137 'dependencies': [ 138 '<(DEPTH)/cpputil/cpputil.gyp:cpputil', 139 '<(DEPTH)/exports.gyp:nss_exports', 140 '<(DEPTH)/fuzz/targets/lib/asn1/asn1.gyp:asn1', 141 '<(DEPTH)/fuzz/targets/lib/base/base.gyp:base', 142 'nssfuzz_base', 143 ], 144 }, 145 { 146 'target_name': 'nssfuzz-pkcs8', 147 'type': 'executable', 148 'sources': [ 149 'pkcs8.cc', 150 ], 151 'dependencies': [ 152 '<(DEPTH)/cpputil/cpputil.gyp:cpputil', 153 '<(DEPTH)/exports.gyp:nss_exports', 154 '<(DEPTH)/fuzz/targets/lib/asn1/asn1.gyp:asn1', 155 '<(DEPTH)/fuzz/targets/lib/base/base.gyp:base', 156 'nssfuzz_base', 157 ], 158 }, 159 { 160 'target_name': 'nssfuzz-pkcs12', 161 'type': 'executable', 162 'sources': [ 163 'pkcs12.cc', 164 ], 165 'dependencies': [ 166 '<(DEPTH)/cpputil/cpputil.gyp:cpputil', 167 '<(DEPTH)/exports.gyp:nss_exports', 168 '<(DEPTH)/fuzz/targets/lib/asn1/asn1.gyp:asn1', 169 '<(DEPTH)/fuzz/targets/lib/base/base.gyp:base', 170 'nssfuzz_base', 171 ], 172 }, 173 { 174 'target_name': 'nssfuzz-quickder', 175 'type': 'executable', 176 'sources': [ 177 'quickder.cc', 178 ], 179 'dependencies': [ 180 '<(DEPTH)/exports.gyp:nss_exports', 181 '<(DEPTH)/fuzz/targets/lib/asn1/asn1.gyp:asn1', 182 '<(DEPTH)/fuzz/targets/lib/base/base.gyp:base', 183 'nssfuzz_base', 184 ], 185 }, 186 { 187 'target_name': 'nssfuzz-smime', 188 'type': 'executable', 189 'sources': [ 190 'smime.cc', 191 ], 192 'dependencies': [ 193 '<(DEPTH)/cpputil/cpputil.gyp:cpputil', 194 '<(DEPTH)/exports.gyp:nss_exports', 195 '<(DEPTH)/fuzz/targets/lib/asn1/asn1.gyp:asn1', 196 '<(DEPTH)/fuzz/targets/lib/base/base.gyp:base', 197 'nssfuzz_base', 198 ], 199 }, 200 { 201 'target_name': 'nssfuzz-tls-client', 202 'type': 'executable', 203 'sources': [ 204 'tls_client.cc', 205 ], 206 'dependencies': [ 207 '<(DEPTH)/cpputil/cpputil.gyp:cpputil', 208 '<(DEPTH)/exports.gyp:nss_exports', 209 '<(DEPTH)/fuzz/targets/lib/base/base.gyp:base', 210 '<(DEPTH)/fuzz/targets/lib/tls/tls.gyp:tls_client', 211 'nssfuzz_base', 212 ], 213 }, 214 { 215 'target_name': 'nssfuzz-tls-server', 216 'type': 'executable', 217 'sources': [ 218 'tls_server.cc', 219 ], 220 'dependencies': [ 221 '<(DEPTH)/cpputil/cpputil.gyp:cpputil', 222 '<(DEPTH)/exports.gyp:nss_exports', 223 '<(DEPTH)/fuzz/targets/lib/base/base.gyp:base', 224 '<(DEPTH)/fuzz/targets/lib/tls/tls.gyp:tls_server', 225 'nssfuzz_base', 226 ], 227 }, 228 { 229 'target_name': 'nssfuzz', 230 'type': 'none', 231 'dependencies': [ 232 'nssfuzz-asn1', 233 'nssfuzz-certDN', 234 'nssfuzz-dtls-client', 235 'nssfuzz-dtls-server', 236 'nssfuzz-ech', 237 'nssfuzz-pkcs7', 238 'nssfuzz-pkcs8', 239 'nssfuzz-pkcs12', 240 'nssfuzz-quickder', 241 'nssfuzz-smime', 242 'nssfuzz-tls-client', 243 'nssfuzz-tls-server', 244 ], 245 }, 246 ], 247 }