| 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("//build/config/arm.gni") | 5 import("//build/config/arm.gni") |
| 6 import("//testing/test.gni") | 6 import("//testing/test.gni") |
| 7 | 7 |
| 8 # If fixed point implementation shall be used (otherwise float). | 8 # If fixed point implementation shall be used (otherwise float). |
| 9 use_opus_fixed_point = current_cpu == "arm" || current_cpu == "arm64" | 9 use_opus_fixed_point = current_cpu == "arm" || current_cpu == "arm64" |
| 10 | 10 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 ] | 49 ] |
| 50 args = [ | 50 args = [ |
| 51 rebase_path("//third_party/opus/src/celt/arm/arm2gnu.pl", root_build_dir), | 51 rebase_path("//third_party/opus/src/celt/arm/arm2gnu.pl", root_build_dir), |
| 52 rebase_path("//third_party/opus/src/celt/arm/celt_pitch_xcorr_arm.s", | 52 rebase_path("//third_party/opus/src/celt/arm/celt_pitch_xcorr_arm.s", |
| 53 root_build_dir), | 53 root_build_dir), |
| 54 rebase_path("$target_gen_dir/celt_pitch_xcorr_arm_gnu.S", root_build_dir), | 54 rebase_path("$target_gen_dir/celt_pitch_xcorr_arm_gnu.S", root_build_dir), |
| 55 ] | 55 ] |
| 56 } | 56 } |
| 57 } | 57 } |
| 58 | 58 |
| 59 config("opus_warnings") { |
| 60 if (is_clang && !is_nacl) { |
| 61 # TODO(thakis): Remove once silk/macros.h has been fixed |
| 62 cflags = [ "-Wno-expansion-to-defined" ] |
| 63 } |
| 64 } |
| 65 |
| 59 source_set("opus") { | 66 source_set("opus") { |
| 60 gypi_values = exec_script("//build/gypi_to_gn.py", | 67 gypi_values = exec_script("//build/gypi_to_gn.py", |
| 61 [ rebase_path("opus_srcs.gypi") ], | 68 [ rebase_path("opus_srcs.gypi") ], |
| 62 "scope", | 69 "scope", |
| 63 [ "opus_srcs.gypi" ]) | 70 [ "opus_srcs.gypi" ]) |
| 64 sources = gypi_values.opus_common_sources | 71 sources = gypi_values.opus_common_sources |
| 65 | 72 |
| 66 defines = [ | 73 defines = [ |
| 67 "OPUS_BUILD", | 74 "OPUS_BUILD", |
| 68 "OPUS_EXPORT=", | 75 "OPUS_EXPORT=", |
| 69 ] | 76 ] |
| 70 | 77 |
| 71 include_dirs = [ | 78 include_dirs = [ |
| 72 "src/celt", | 79 "src/celt", |
| 73 "src/silk", | 80 "src/silk", |
| 74 ] | 81 ] |
| 75 | 82 |
| 76 configs -= [ "//build/config/compiler:chromium_code" ] | 83 configs -= [ "//build/config/compiler:chromium_code" ] |
| 77 configs += [ "//build/config/compiler:no_chromium_code" ] | 84 configs += [ |
| 85 "//build/config/compiler:no_chromium_code", |
| 86 |
| 87 # Must be after no_chromium_code to have an effect: |
| 88 ":opus_warnings", |
| 89 ] |
| 78 public_configs = [ ":opus_config" ] | 90 public_configs = [ ":opus_config" ] |
| 79 | 91 |
| 80 if (is_win) { | 92 if (is_win) { |
| 81 defines += [ | 93 defines += [ |
| 82 "USE_ALLOCA", | 94 "USE_ALLOCA", |
| 83 "inline=__inline", | 95 "inline=__inline", |
| 84 ] | 96 ] |
| 85 | 97 |
| 86 cflags = [ | 98 cflags = [ |
| 87 "/wd4305", # Disable truncation warning in celt/pitch.c . | 99 "/wd4305", # Disable truncation warning in celt/pitch.c . |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 configs -= [ "//build/config/compiler:chromium_code" ] | 284 configs -= [ "//build/config/compiler:chromium_code" ] |
| 273 configs += [ | 285 configs += [ |
| 274 "//build/config/compiler:no_chromium_code", | 286 "//build/config/compiler:no_chromium_code", |
| 275 ":opus_test_config", | 287 ":opus_test_config", |
| 276 ] | 288 ] |
| 277 | 289 |
| 278 deps = [ | 290 deps = [ |
| 279 ":opus", | 291 ":opus", |
| 280 ] | 292 ] |
| 281 } | 293 } |
| OLD | NEW |