Make moderate binding testable by command line switches
[chromium-blink-merge.git] / third_party / android_platform / relocation_packer.gyp
blobcb09841fc2f7ed289db9c8ccb0136745c4cd44ba
1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6   'variables': {
7     # These files lists are shared with the GN build.
8     'relocation_packer_sources': [
9       'bionic/tools/relocation_packer/src/debug.cc',
10       'bionic/tools/relocation_packer/src/delta_encoder.cc',
11       'bionic/tools/relocation_packer/src/elf_file.cc',
12       'bionic/tools/relocation_packer/src/packer.cc',
13       'bionic/tools/relocation_packer/src/sleb128.cc',
14     ],
15     'relocation_packer_main_source': [
16       'bionic/tools/relocation_packer/src/main.cc',
17     ],
18     'relocation_packer_test_sources': [
19       'bionic/tools/relocation_packer/src/debug_unittest.cc',
20       'bionic/tools/relocation_packer/src/delta_encoder_unittest.cc',
21       'bionic/tools/relocation_packer/src/elf_file_unittest.cc',
22       'bionic/tools/relocation_packer/src/packer_unittest.cc',
23       'bionic/tools/relocation_packer/src/sleb128_unittest.cc',
24       'bionic/tools/relocation_packer/src/run_all_unittests.cc',
25     ],
26   },
27   'targets': [
28     {
29       # GN: //third_party/android_platform:android_lib_relocation_packer
30       'target_name': 'android_lib_relocation_packer',
31       'toolsets': ['host'],
32       'type': 'static_library',
33       'dependencies': [
34         '../../third_party/elfutils/elfutils.gyp:libelf',
35       ],
36       'sources': [
37         '<@(relocation_packer_sources)'
38       ],
39     },
40     {
41       # GN: //third_party/android_platform:android_relocation_packer
42       'target_name': 'android_relocation_packer',
43       'toolsets': ['host'],
44       'type': 'executable',
45       'dependencies': [
46         '../../third_party/elfutils/elfutils.gyp:libelf',
47         'android_lib_relocation_packer',
48       ],
49       'sources': [
50         '<@(relocation_packer_main_source)'
51       ],
52     },
53     {
54       # TODO(GN)
55       'target_name': 'android_relocation_packer_unittests',
56       'toolsets': ['host'],
57       'type': 'executable',
58       'dependencies': [
59         '../../testing/gtest.gyp:gtest',
60         'android_lib_relocation_packer',
61       ],
62       'include_dirs': [
63         '../..',
64       ],
65       'sources': [
66         '<@(relocation_packer_test_sources)'
67       ],
68       'copies': [
69         {
70           'destination': '<(PRODUCT_DIR)',
71           'files': [
72             'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm32.so',
73             'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm32_packed.so',
74             'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm64.so',
75             'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm64_packed.so',
76             'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_ia32.so',
77             'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_ia32_packed.so',
78             'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_x64.so',
79             'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_x64_packed.so',
80             'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_mips32.so',
81             'bionic/tools/relocation_packer/test_data/elf_file_unittest_relocs_mips32_packed.so',
82           ],
83         },
84       ],
85     },
86   ],