| 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 = cpu_arch == "arm" || cpu_arch == "arm64" | 9 use_opus_fixed_point = current_cpu == "arm" || current_cpu == "arm64" | 
| 10 | 10 | 
| 11 # If ARM optimizations shall be used to accelerate performance. | 11 # If ARM optimizations shall be used to accelerate performance. | 
| 12 use_opus_arm_optimization = cpu_arch == "arm" | 12 use_opus_arm_optimization = current_cpu == "arm" | 
| 13 | 13 | 
| 14 # If OPUS Run Time CPU Detections (RTCD) shall be used. | 14 # If OPUS Run Time CPU Detections (RTCD) shall be used. | 
| 15 # Based on the conditions in celt/arm/armcpu.c: | 15 # Based on the conditions in celt/arm/armcpu.c: | 
| 16 # defined(_MSC_VER) || defined(__linux__). | 16 # defined(_MSC_VER) || defined(__linux__). | 
| 17 use_opus_rtcd = cpu_arch == "arm" && (is_win || is_android || is_linux) | 17 use_opus_rtcd = current_cpu == "arm" && (is_win || is_android || is_linux) | 
| 18 | 18 | 
| 19 config("opus_config") { | 19 config("opus_config") { | 
| 20   include_dirs = [ "src/include" ] | 20   include_dirs = [ "src/include" ] | 
| 21 } | 21 } | 
| 22 | 22 | 
| 23 config("opus_test_config") { | 23 config("opus_test_config") { | 
| 24   include_dirs = [ | 24   include_dirs = [ | 
| 25     "src/celt", | 25     "src/celt", | 
| 26     "src/silk", | 26     "src/silk", | 
| 27   ] | 27   ] | 
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 90       "VAR_ARRAYS", | 90       "VAR_ARRAYS", | 
| 91     ] | 91     ] | 
| 92   } | 92   } | 
| 93 | 93 | 
| 94   if (is_posix && !is_android) { | 94   if (is_posix && !is_android) { | 
| 95     # Suppress a warning given by opus_decoder.c that tells us | 95     # Suppress a warning given by opus_decoder.c that tells us | 
| 96     # optimizations are turned off. | 96     # optimizations are turned off. | 
| 97     cflags = [ "-Wno-#pragma-messages" ] | 97     cflags = [ "-Wno-#pragma-messages" ] | 
| 98   } | 98   } | 
| 99 | 99 | 
| 100   if (!is_debug && is_posix && (cpu_arch == "arm" || cpu_arch == "arm64")) { | 100   if (!is_debug && is_posix && | 
|  | 101       (current_cpu == "arm" || current_cpu == "arm64")) { | 
| 101     configs -= [ "//build/config/compiler:optimize" ] | 102     configs -= [ "//build/config/compiler:optimize" ] | 
| 102     configs += [ "//build/config/compiler:optimize_max" ] | 103     configs += [ "//build/config/compiler:optimize_max" ] | 
| 103   } | 104   } | 
| 104 | 105 | 
| 105   if (use_opus_fixed_point) { | 106   if (use_opus_fixed_point) { | 
| 106     sources += gypi_values.opus_fixed_sources | 107     sources += gypi_values.opus_fixed_sources | 
| 107 | 108 | 
| 108     defines += [ "FIXED_POINT" ] | 109     defines += [ "FIXED_POINT" ] | 
| 109 | 110 | 
| 110     include_dirs += [ "src/silk/fixed" ] | 111     include_dirs += [ "src/silk/fixed" ] | 
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 251   configs -= [ "//build/config/compiler:chromium_code" ] | 252   configs -= [ "//build/config/compiler:chromium_code" ] | 
| 252   configs += [ | 253   configs += [ | 
| 253     "//build/config/compiler:no_chromium_code", | 254     "//build/config/compiler:no_chromium_code", | 
| 254     ":opus_test_config", | 255     ":opus_test_config", | 
| 255   ] | 256   ] | 
| 256 | 257 | 
| 257   deps = [ | 258   deps = [ | 
| 258     ":opus", | 259     ":opus", | 
| 259   ] | 260   ] | 
| 260 } | 261 } | 
| OLD | NEW | 
|---|