| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//testing/libfuzzer/fuzzer_test.gni") |
| 6 |
| 5 config("qcms_config") { | 7 config("qcms_config") { |
| 6 include_dirs = [ "src" ] | 8 include_dirs = [ "src" ] |
| 7 } | 9 } |
| 8 | 10 |
| 9 disable_qcms = false | 11 disable_qcms = false |
| 10 | 12 |
| 11 static_library("qcms") { | 13 static_library("qcms") { |
| 12 if (disable_qcms) { | 14 if (disable_qcms) { |
| 13 sources = [ | 15 sources = [ |
| 14 "src/empty.c", | 16 "src/empty.c", |
| (...skipping 26 matching lines...) Expand all Loading... |
| 41 | 43 |
| 42 if (is_win) { | 44 if (is_win) { |
| 43 cflags = [ | 45 cflags = [ |
| 44 "/wd4018", # Signed/unsigned mismatch in comparison. | 46 "/wd4018", # Signed/unsigned mismatch in comparison. |
| 45 "/wd4056", # Overflow in floating-point constant arithmetic (INFINITY). | 47 "/wd4056", # Overflow in floating-point constant arithmetic (INFINITY). |
| 46 "/wd4756", # Overflow in constant arithmetic (INFINITY). | 48 "/wd4756", # Overflow in constant arithmetic (INFINITY). |
| 47 ] | 49 ] |
| 48 } | 50 } |
| 49 } | 51 } |
| 50 | 52 |
| 53 # fuzzers BUILD depends on this target. Needed for package discovery |
| 54 group("fuzzers") { |
| 55 } |
| 56 |
| 57 fuzzer_test("qcms_color_space_fuzzer") { |
| 58 sources = [ |
| 59 "//testing/libfuzzer/fuzzers/color_space_data.h", |
| 60 "qcms_color_space_fuzzer.cc", |
| 61 ] |
| 62 deps = [ |
| 63 ":qcms", |
| 64 "//base", |
| 65 ] |
| 66 dict = "//testing/libfuzzer/fuzzers/dicts/icc.dict" |
| 67 libfuzzer_options = [ "max_len=4194304" ] |
| 68 } |
| 69 |
| 51 if (!disable_qcms) { | 70 if (!disable_qcms) { |
| 52 executable("qcms_tests") { | 71 executable("qcms_tests") { |
| 53 if (current_cpu == "x86" || current_cpu == "x64") { | 72 if (current_cpu == "x86" || current_cpu == "x64") { |
| 54 defines = [ "SSE2_ENABLE" ] | 73 defines = [ "SSE2_ENABLE" ] |
| 55 } | 74 } |
| 56 sources = [ | 75 sources = [ |
| 57 "src/tests/qcms_test_internal_srgb.c", | 76 "src/tests/qcms_test_internal_srgb.c", |
| 58 "src/tests/qcms_test_main.c", | 77 "src/tests/qcms_test_main.c", |
| 59 "src/tests/qcms_test_munsell.c", | 78 "src/tests/qcms_test_munsell.c", |
| 60 "src/tests/qcms_test_ntsc_gamut.c", | 79 "src/tests/qcms_test_ntsc_gamut.c", |
| 61 "src/tests/qcms_test_output_trc.c", | 80 "src/tests/qcms_test_output_trc.c", |
| 62 "src/tests/qcms_test_tetra_clut_rgba.c", | 81 "src/tests/qcms_test_tetra_clut_rgba.c", |
| 63 "src/tests/qcms_test_util.c", | 82 "src/tests/qcms_test_util.c", |
| 64 ] | 83 ] |
| 65 | 84 |
| 66 deps = [ | 85 deps = [ |
| 67 "//build/config/sanitizers:deps", | 86 "//build/config/sanitizers:deps", |
| 68 "//build/win:default_exe_manifest", | 87 "//build/win:default_exe_manifest", |
| 69 "//third_party/qcms", | 88 "//third_party/qcms", |
| 70 ] | 89 ] |
| 71 | 90 |
| 72 configs -= [ "//build/config/compiler:chromium_code" ] | 91 configs -= [ "//build/config/compiler:chromium_code" ] |
| 73 configs += [ "//build/config/compiler:no_chromium_code" ] | 92 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 74 public_configs = [ ":qcms_config" ] | 93 public_configs = [ ":qcms_config" ] |
| 75 } | 94 } |
| 76 } | 95 } |
| OLD | NEW |