Use libvpx's obj_int_extract and unpack_lib_posix to generate offset header file.
This patch removes generate_asm_header.gypi and uses libvpx's obj_int_extract and
unpack_lib_posix to generate offset header files.
It make the simliar feature's implementation consistent.
R=andrew@webrtc.org, fischman@webrtc.org, fischman@chromium.org
BUG=334447
Committed: https://code.google.com/p/webrtc/source/detail?r=5517
Review URL: https://webrtc-codereview.appspot.com/7769006
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5524 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/audio_processing/audio_processing.gypi b/webrtc/modules/audio_processing/audio_processing.gypi
index ed62a8a..dd5a586 100644
--- a/webrtc/modules/audio_processing/audio_processing.gypi
+++ b/webrtc/modules/audio_processing/audio_processing.gypi
@@ -12,6 +12,7 @@
'<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
],
+ 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/audio_processing/asm_offsets',
},
'targets': [
{
@@ -194,12 +195,15 @@
'conditions': [
['OS=="android" or OS=="ios"', {
'dependencies': [
- 'audio_processing_offsets',
+ '<(gen_core_neon_offsets_gyp):*',
],
'sources': [
'aecm/aecm_core_neon.S',
'ns/nsx_core_neon.S',
],
+ 'include_dirs': [
+ '<(shared_generated_dir)',
+ ],
'sources!': [
'aecm/aecm_core_neon.c',
'ns/nsx_core_neon.c',
@@ -208,22 +212,6 @@
}],
],
}],
- 'conditions': [
- ['OS=="android" or OS=="ios"', {
- 'targets': [{
- 'target_name': 'audio_processing_offsets',
- 'type': 'none',
- 'sources': [
- 'aecm/aecm_core_neon_offsets.c',
- 'ns/nsx_core_neon_offsets.c',
- ],
- 'variables': {
- 'asm_header_dir': 'asm_offsets',
- },
- 'includes': ['../../build/generate_asm_header.gypi',],
- }],
- }],
- ],
}],
],
}
diff --git a/webrtc/modules/audio_processing/gen_core_neon_offsets.gyp b/webrtc/modules/audio_processing/gen_core_neon_offsets.gyp
new file mode 100644
index 0000000..55c7968
--- /dev/null
+++ b/webrtc/modules/audio_processing/gen_core_neon_offsets.gyp
@@ -0,0 +1,45 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+{
+ 'includes': ['lib_core_neon_offsets.gypi'],
+ 'targets' : [
+ {
+ 'target_name': 'gen_nsx_core_neon_offsets_h',
+ 'type': 'none',
+ 'dependencies': [
+ 'lib_core_neon_offsets',
+ '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx_obj_int_extract#host',
+ ],
+ 'sources': ['<(shared_generated_dir)/nsx_core_neon_offsets.o',],
+ 'variables' : {
+ 'unpack_lib_name':'nsx_core_neon_offsets.o',
+ },
+ 'includes': [
+ '../../../third_party/libvpx/unpack_lib_posix.gypi',
+ '../../../third_party/libvpx/obj_int_extract.gypi',
+ ],
+ },
+ {
+ 'target_name': 'gen_aecm_core_neon_offsets_h',
+ 'type': 'none',
+ 'dependencies': [
+ 'lib_core_neon_offsets',
+ '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx_obj_int_extract#host',
+ ],
+ 'variables': {
+ 'unpack_lib_name':'aecm_core_neon_offsets.o',
+ },
+ 'sources': ['<(shared_generated_dir)/aecm_core_neon_offsets.o',],
+ 'includes': [
+ '../../../third_party/libvpx/unpack_lib_posix.gypi',
+ '../../../third_party/libvpx/obj_int_extract.gypi',
+ ],
+ },
+ ],
+}
diff --git a/webrtc/modules/audio_processing/gen_core_neon_offsets_chromium.gyp b/webrtc/modules/audio_processing/gen_core_neon_offsets_chromium.gyp
new file mode 100644
index 0000000..f4a9134
--- /dev/null
+++ b/webrtc/modules/audio_processing/gen_core_neon_offsets_chromium.gyp
@@ -0,0 +1,45 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+{
+ 'includes': ['lib_core_neon_offsets.gypi'],
+ 'targets' : [
+ {
+ 'target_name': 'gen_nsx_core_neon_offsets_h',
+ 'type': 'none',
+ 'dependencies': [
+ 'lib_core_neon_offsets',
+ '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx_obj_int_extract#host',
+ ],
+ 'sources': ['<(shared_generated_dir)/nsx_core_neon_offsets.o',],
+ 'variables' : {
+ 'unpack_lib_name':'nsx_core_neon_offsets.o',
+ },
+ 'includes': [
+ '../../../../third_party/libvpx/unpack_lib_posix.gypi',
+ '../../../../third_party/libvpx/obj_int_extract.gypi',
+ ],
+ },
+ {
+ 'target_name': 'gen_aecm_core_neon_offsets_h',
+ 'type': 'none',
+ 'dependencies': [
+ 'lib_core_neon_offsets',
+ '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx_obj_int_extract#host',
+ ],
+ 'variables': {
+ 'unpack_lib_name':'aecm_core_neon_offsets.o',
+ },
+ 'sources': ['<(shared_generated_dir)/aecm_core_neon_offsets.o',],
+ 'includes': [
+ '../../../../third_party/libvpx/unpack_lib_posix.gypi',
+ '../../../../third_party/libvpx/obj_int_extract.gypi',
+ ],
+ },
+ ],
+}
diff --git a/webrtc/modules/audio_processing/lib_core_neon_offsets.gypi b/webrtc/modules/audio_processing/lib_core_neon_offsets.gypi
new file mode 100644
index 0000000..42ec9ac
--- /dev/null
+++ b/webrtc/modules/audio_processing/lib_core_neon_offsets.gypi
@@ -0,0 +1,51 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+# This file has common information for gen_core_neon_offsets.gyp
+# and gen_core_neon_offsets_chromium.gyp
+{
+ 'variables': {
+ 'variables' : {
+ 'lib_intermediate_name': '',
+ 'conditions' : [
+ ['android_webview_build==1', {
+ 'lib_intermediate_name' : '<(android_src)/$(call intermediates-dir-for, STATIC_LIBRARIES, lib_core_neon_offsets)/lib_core_neon_offsets.a',
+ }],
+ ],
+ },
+ 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/audio_processing/asm_offsets',
+ 'output_dir': '<(shared_generated_dir)',
+ 'output_format': 'cheader',
+ 'unpack_lib_search_path_list': [
+ '-a', '<(PRODUCT_DIR)/lib_core_neon_offsets.a',
+ '-a', '<(LIB_DIR)/webrtc/modules/audio_processing/lib_core_neon_offsets.a',
+ '-a', '<(LIB_DIR)/third_party/webrtc/modules/audio_processing/lib_core_neon_offsets.a',
+ '-a', '<(lib_intermediate_name)',
+ ],
+ 'unpack_lib_output_dir':'<(shared_generated_dir)',
+ },
+ 'includes': [
+ '../../build/common.gypi',
+ ],
+ 'conditions': [
+ ['((target_arch=="arm" and arm_version==7) or target_arch=="armv7") and (OS=="android" or OS=="ios")', {
+ 'targets' : [
+ {
+ 'target_name': 'lib_core_neon_offsets',
+ 'type': 'static_library',
+ 'android_unmangled_name': 1,
+ 'hard_dependency': 1,
+ 'sources': [
+ 'ns/nsx_core_neon_offsets.c',
+ 'aecm/aecm_core_neon_offsets.c',
+ ],
+ },
+ ],
+ }],
+ ],
+}