| 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 | |
| 66 static_library("opus") { | 59 static_library("opus") { |
| 67 gypi_values = exec_script("//build/gypi_to_gn.py", | 60 gypi_values = exec_script("//build/gypi_to_gn.py", |
| 68 [ rebase_path("opus_srcs.gypi") ], | 61 [ rebase_path("opus_srcs.gypi") ], |
| 69 "scope", | 62 "scope", |
| 70 [ "opus_srcs.gypi" ]) | 63 [ "opus_srcs.gypi" ]) |
| 71 sources = gypi_values.opus_common_sources | 64 sources = gypi_values.opus_common_sources |
| 72 | 65 |
| 73 defines = [ | 66 defines = [ |
| 74 "OPUS_BUILD", | 67 "OPUS_BUILD", |
| 75 "OPUS_EXPORT=", | 68 "OPUS_EXPORT=", |
| 76 ] | 69 ] |
| 77 | 70 |
| 78 include_dirs = [ | 71 include_dirs = [ |
| 79 "src/celt", | 72 "src/celt", |
| 80 "src/silk", | 73 "src/silk", |
| 81 ] | 74 ] |
| 82 | 75 |
| 83 configs -= [ "//build/config/compiler:chromium_code" ] | 76 configs -= [ "//build/config/compiler:chromium_code" ] |
| 84 configs += [ | 77 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 85 "//build/config/compiler:no_chromium_code", | |
| 86 | |
| 87 # Must be after no_chromium_code to have an effect: | |
| 88 ":opus_warnings", | |
| 89 ] | |
| 90 public_configs = [ ":opus_config" ] | 78 public_configs = [ ":opus_config" ] |
| 91 cflags = [] | 79 cflags = [] |
| 92 | 80 |
| 93 if (is_win) { | 81 if (is_win) { |
| 94 defines += [ | 82 defines += [ |
| 95 "USE_ALLOCA", | 83 "USE_ALLOCA", |
| 96 "inline=__inline", | 84 "inline=__inline", |
| 97 ] | 85 ] |
| 98 | 86 |
| 99 cflags += [ | 87 cflags += [ |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 configs -= [ "//build/config/compiler:chromium_code" ] | 285 configs -= [ "//build/config/compiler:chromium_code" ] |
| 298 configs += [ | 286 configs += [ |
| 299 "//build/config/compiler:no_chromium_code", | 287 "//build/config/compiler:no_chromium_code", |
| 300 ":opus_test_config", | 288 ":opus_test_config", |
| 301 ] | 289 ] |
| 302 | 290 |
| 303 deps = [ | 291 deps = [ |
| 304 ":opus", | 292 ":opus", |
| 305 ] | 293 ] |
| 306 } | 294 } |
| OLD | NEW |