Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: libvpx.gyp

Issue 130563008: Refactoring unpack_lib_posix and obj_int_extract. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/libvpx
Patch Set: address comments Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | obj_int_extract.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libvpx.gyp
diff --git a/libvpx.gyp b/libvpx.gyp
index 12dbca127e675768c6f6d301beb59d82c0e9f0e3..38da5ad96e6dc5219edbaec7a690ca95c8fcc35f 100644
--- a/libvpx.gyp
+++ b/libvpx.gyp
@@ -396,10 +396,17 @@
'libvpx_obj_int_extract#host',
],
'variables' : {
- 'lib_intermediate_path' : '',
+ 'lib_intermediate_name' : '',
+ 'output_format':'',
+ 'output_dir': '<(shared_generated_dir)',
'conditions' : [
['android_webview_build==1', {
- 'lib_intermediate_path' : '<(android_src)/$(call intermediates-dir-for, STATIC_LIBRARIES, libvpx_asm_offsets_vp8)/libvpx_asm_offsets_vp8.a',
+ 'lib_intermediate_name' : '<(android_src)/$(call intermediates-dir-for, STATIC_LIBRARIES, libvpx_asm_offsets_vp8)/libvpx_asm_offsets_vp8.a',
+ }],
+ ['(target_arch=="arm" or target_arch=="armv7")', {
+ 'output_format': 'gas',
+ }, {
+ 'output_format': 'rvds',
}],
],
},
@@ -428,66 +435,24 @@
'<(INTERMEDIATE_DIR)/vp8_asm_enc_offsets.obj',
],
}, {
- 'actions': [
- {
- # Take archived .a file and unpack it unto .o files.
- 'action_name': 'unpack_lib_posix',
- 'inputs': [
- 'unpack_lib_posix.sh',
- ],
- 'outputs': [
- '<(INTERMEDIATE_DIR)/vp8_asm_enc_offsets.o',
- ],
- 'action': [
- '<(DEPTH)/third_party/libvpx/unpack_lib_posix.sh',
- '-d', '<(INTERMEDIATE_DIR)',
- '-a', '<(PRODUCT_DIR)/libvpx_asm_offsets_vp8.a',
- '-a', '<(LIB_DIR)/third_party/libvpx/libvpx_asm_offsets_vp8.a',
- '-a', '<(LIB_DIR)/Source/WebKit/chromium/third_party/libvpx/libvpx_asm_offsets_vp8.a',
- '-a', '<(lib_intermediate_path)',
- '-f', 'vp8_asm_enc_offsets.o',
- ],
- 'process_output_as_sources': 1,
- },
- ],
+ 'variables': {
+ 'unpack_lib_search_path_list': [
+ '-a', '<(PRODUCT_DIR)/libvpx_asm_offsets_vp8.a',
+ '-a', '<(LIB_DIR)/third_party/libvpx/libvpx_asm_offsets_vp8.a',
+ '-a', '<(LIB_DIR)/Source/WebKit/chromium/third_party/libvpx/libvpx_asm_offsets_vp8.a',
+ '-a', '<(lib_intermediate_name)',
+ ],
+ 'unpack_lib_output_dir':'<(INTERMEDIATE_DIR)',
+ 'unpack_lib_name':'vp8_asm_enc_offsets.o'
+ },
+ 'includes': ['unpack_lib_posix.gypi'],
# Need this otherwise gyp won't run the rule on them.
'sources': [
'<(INTERMEDIATE_DIR)/vp8_asm_enc_offsets.o',
],
}],
],
- 'rules': [
- {
- # Rule to extract integer values for each symbol from an object file.
- 'rule_name': 'obj_int_extract',
- 'extension': '<(asm_obj_extension)',
- 'inputs': [
- '<(PRODUCT_DIR)/libvpx_obj_int_extract',
- 'obj_int_extract.py',
- ],
- 'outputs': [
- '<(shared_generated_dir)/<(RULE_INPUT_ROOT).asm',
- ],
- 'variables': {
- 'conditions': [
- ['(target_arch=="arm" or target_arch=="armv7")', {
- 'asm_format': 'gas',
- }, {
- 'asm_format': 'rvds',
- }],
- ],
- },
- 'action': [
- 'python',
- '<(DEPTH)/third_party/libvpx/obj_int_extract.py',
- '-e', '<(PRODUCT_DIR)/libvpx_obj_int_extract',
- '-f', '<(asm_format)',
- '-b', '<(RULE_INPUT_PATH)',
- '-o', '<(shared_generated_dir)/<(RULE_INPUT_ROOT).asm',
- ],
- 'message': 'Generate assembly offsets <(RULE_INPUT_PATH)',
- },
- ],
+ 'includes': ['obj_int_extract.gypi'],
},
{
# A target that takes assembly offsets library and generate the
@@ -502,10 +467,17 @@
'libvpx_obj_int_extract#host',
],
'variables' : {
- 'lib_intermediate_path' : '',
+ 'lib_intermediate_name' : '',
+ 'output_format':'',
+ 'output_dir': '<(shared_generated_dir)',
'conditions' : [
['android_webview_build==1', {
- 'lib_intermediate_path' : '<(android_src)/$(call intermediates-dir-for, STATIC_LIBRARIES, libvpx_asm_offsets_vpx_scale)/libvpx_asm_offsets_vpx_scale.a',
+ 'lib_intermediate_name' : '<(android_src)/$(call intermediates-dir-for, STATIC_LIBRARIES, libvpx_asm_offsets_vpx_scale)/libvpx_asm_offsets_vpx_scale.a',
+ }],
+ ['(target_arch=="arm" or target_arch=="armv7")', {
+ 'output_format': 'gas',
+ }, {
+ 'output_format': 'rvds',
}],
],
},
@@ -534,66 +506,24 @@
'<(INTERMEDIATE_DIR)/vpx_scale_asm_offsets.obj',
],
}, {
- 'actions': [
- {
- # Take archived .a file and unpack it unto .o files.
- 'action_name': 'unpack_lib_posix',
- 'inputs': [
- 'unpack_lib_posix.sh',
- ],
- 'outputs': [
- '<(INTERMEDIATE_DIR)/vpx_scale_asm_offsets.o',
- ],
- 'action': [
- '<(DEPTH)/third_party/libvpx/unpack_lib_posix.sh',
- '-d', '<(INTERMEDIATE_DIR)',
- '-a', '<(PRODUCT_DIR)/libvpx_asm_offsets_vpx_scale.a',
- '-a', '<(LIB_DIR)/third_party/libvpx/libvpx_asm_offsets_vpx_scale.a',
- '-a', '<(LIB_DIR)/Source/WebKit/chromium/third_party/libvpx/libvpx_asm_offsets_vpx_scale.a',
- '-a', '<(lib_intermediate_path)',
- '-f', 'vpx_scale_asm_offsets.o',
- ],
- 'process_output_as_sources': 1,
- },
- ],
- # Need this otherwise gyp won't run the rule on them.
- 'sources': [
- '<(INTERMEDIATE_DIR)/vpx_scale_asm_offsets.o',
- ],
- }],
- ],
- 'rules': [
- {
- # Rule to extract integer values for each symbol from an object file.
- 'rule_name': 'obj_int_extract',
- 'extension': '<(asm_obj_extension)',
- 'inputs': [
- '<(PRODUCT_DIR)/libvpx_obj_int_extract',
- 'obj_int_extract.py',
- ],
- 'outputs': [
- '<(shared_generated_dir)/<(RULE_INPUT_ROOT).asm',
- ],
'variables': {
- 'conditions': [
- ['(target_arch=="arm" or target_arch=="armv7")', {
- 'asm_format': 'gas',
- }, {
- 'asm_format': 'rvds',
- }],
+ 'unpack_lib_search_path_list': [
+ '-a', '<(PRODUCT_DIR)/libvpx_asm_offsets_vpx_scale.a',
+ '-a', '<(LIB_DIR)/third_party/libvpx/libvpx_asm_offsets_vpx_scale.a',
+ '-a', '<(LIB_DIR)/Source/WebKit/chromium/third_party/libvpx/libvpx_asm_offsets_vpx_scale.a',
+ '-a', '<(lib_intermediate_name)',
],
+ 'unpack_lib_output_dir':'<(INTERMEDIATE_DIR)',
+ 'unpack_lib_name':'vpx_scale_asm_offsets.o'
},
- 'action': [
- 'python',
- '<(DEPTH)/third_party/libvpx/obj_int_extract.py',
- '-e', '<(PRODUCT_DIR)/libvpx_obj_int_extract',
- '-f', '<(asm_format)',
- '-b', '<(RULE_INPUT_PATH)',
- '-o', '<(shared_generated_dir)/<(RULE_INPUT_ROOT).asm',
+ 'includes': ['unpack_lib_posix.gypi'],
+ # Need this otherwise gyp won't run the rule on them.
+ 'sources': [
+ '<(INTERMEDIATE_DIR)/vpx_scale_asm_offsets.o',
Johann 2014/01/27 23:19:58 Is there a way to mark this file as dirty whenever
michaelbai 2014/01/27 23:55:21 Which files or configuration changed? On 2014/01
Johann 2014/01/28 00:03:57 Any of the sources for libvpx_asm_offsets_*: <(lib
michaelbai 2014/01/28 00:15:39 You may put a list of potential .a files as 'input
],
- 'message': 'Generate assembly offsets <(RULE_INPUT_PATH)',
- },
+ }],
],
+ 'includes': ['obj_int_extract.gypi'],
},
{
'target_name': 'simple_encoder',
« no previous file with comments | « no previous file | obj_int_extract.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698