diff options
Diffstat (limited to 'third_party/opus/BUILD.gn')
-rw-r--r-- | third_party/opus/BUILD.gn | 45 |
1 files changed, 19 insertions, 26 deletions
diff --git a/third_party/opus/BUILD.gn b/third_party/opus/BUILD.gn index 2e95756..696234d 100644 --- a/third_party/opus/BUILD.gn +++ b/third_party/opus/BUILD.gn @@ -5,20 +5,18 @@ import("//build/config/arm.gni") # If fixed point implementation shall be used (otherwise float). -use_opus_fixed_point = (cpu_arch == "arm" || cpu_arch == "arm64") +use_opus_fixed_point = cpu_arch == "arm" || cpu_arch == "arm64" # If ARM optimizations shall be used to accelerate performance. -use_opus_arm_optimization = (cpu_arch == "arm") +use_opus_arm_optimization = cpu_arch == "arm" # If OPUS Run Time CPU Detections (RTCD) shall be used. # Based on the conditions in celt/arm/armcpu.c: # defined(_MSC_VER) || defined(__linux__). -use_opus_rtcd = (cpu_arch == "arm" && (is_win || is_android || is_linux)) +use_opus_rtcd = cpu_arch == "arm" && (is_win || is_android || is_linux) config("opus_config") { - include_dirs = [ - "src/include", - ] + include_dirs = [ "src/include" ] } if (use_opus_rtcd) { @@ -26,22 +24,19 @@ if (use_opus_rtcd) { script = "convert_rtcd_assembler.py" outputs = [ "$target_gen_dir/celt_pitch_xcorr_arm_gnu.S" ] args = [ - rebase_path("//third_party/opus/src/celt/arm/arm2gnu.pl", - root_build_dir), + rebase_path("//third_party/opus/src/celt/arm/arm2gnu.pl", root_build_dir), rebase_path("//third_party/opus/src/celt/arm/celt_pitch_xcorr_arm.s", root_build_dir), - rebase_path("$target_gen_dir/celt_pitch_xcorr_arm_gnu.S", - root_build_dir), + rebase_path("$target_gen_dir/celt_pitch_xcorr_arm_gnu.S", root_build_dir), ] } } source_set("opus") { - gypi_values = exec_script( - "//build/gypi_to_gn.py", - [ rebase_path("opus_srcs.gypi") ], - "scope", - [ "opus_srcs.gypi" ]) + gypi_values = exec_script("//build/gypi_to_gn.py", + [ rebase_path("opus_srcs.gypi") ], + "scope", + [ "opus_srcs.gypi" ]) sources = gypi_values.opus_common_sources defines = [ @@ -79,9 +74,7 @@ source_set("opus") { if (is_posix && !is_android) { # Suppress a warning given by opus_decoder.c that tells us # optimizations are turned off. - cflags = [ - "-Wno-#pragma-messages", - ] + cflags = [ "-Wno-#pragma-messages" ] } if (!is_debug && is_posix && (cpu_arch == "arm" || cpu_arch == "arm64")) { @@ -94,15 +87,11 @@ source_set("opus") { defines += [ "FIXED_POINT" ] - include_dirs += [ - "src/silk/fixed", - ] + include_dirs += [ "src/silk/fixed" ] } else { sources += gypi_values.opus_float_sources - include_dirs += [ - "src/silk/float", - ] + include_dirs += [ "src/silk/float" ] } if (use_opus_arm_optimization) { @@ -139,7 +128,9 @@ source_set("opus") { "OPUS_HAVE_RTCD", ] - deps = [ ":convert_rtcd_assembler" ] + deps = [ + ":convert_rtcd_assembler", + ] } } } @@ -167,5 +158,7 @@ executable("opus_demo") { cflags = [ "-Wno-absolute-value" ] } - deps = [ ":opus" ] + deps = [ + ":opus", + ] } |