Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome_elf / chrome_elf.gyp
blobcbbb4b4b580717ff5fd51a327076d7fd1953b87d
1 # Copyright 2013 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.
5   'variables': {
6     'chromium_code': 1,
7   },
8   'includes': [
9     '../build/util/version.gypi',
10     '../build/win_precompile.gypi',
11     'blacklist.gypi',
12     'dll_hash.gypi',
13   ],
14   'targets': [
15     {
16       'target_name': 'chrome_elf_resources',
17       'type': 'none',
18       'variables': {
19         'output_dir': 'chrome_elf',
20         'branding_path': '../chrome/app/theme/<(branding_path_component)/BRANDING',
21         'template_input_path': '../chrome/app/chrome_version.rc.version',
22       },
23       'sources': [
24         'chrome_elf.ver',
25       ],
26       'includes': [
27         '../chrome/version_resource_rules.gypi',
28       ],
29     },
30     {
31       'target_name': 'chrome_elf',
32       'type': 'shared_library',
33       'include_dirs': [
34         '..',
35       ],
36       'sources': [
37         'chrome_elf.def',
38         'chrome_elf_main.cc',
39         'chrome_elf_main.h',
40         '<(SHARED_INTERMEDIATE_DIR)/chrome_elf/chrome_elf_version.rc',
41       ],
42       'dependencies': [
43         'blacklist',
44         'chrome_elf_breakpad',
45         'chrome_elf_lib',
46         'chrome_elf_resources',
47       ],
48       'msvs_settings': {
49         'VCLinkerTool': {
50           'conditions': [
51             ['target_arch=="ia32"', {
52               # Don't set an x64 base address (to avoid breaking HE-ASLR).
53               'BaseAddress': '0x01c20000',
54             }],
55           ],
56           # Set /SUBSYSTEM:WINDOWS.
57           'SubSystem': '2',
58           'AdditionalDependencies!': [
59             'user32.lib',
60           ],
61           'IgnoreDefaultLibraryNames': [
62             'user32.lib',
63           ],
64         },
65       },
66     },
67     {
68       'target_name': 'chrome_elf_unittests_exe',
69       'product_name': 'chrome_elf_unittests',
70       'type': 'executable',
71       'sources': [
72         'blacklist/test/blacklist_test.cc',
73         'chrome_elf_util_unittest.cc',
74         'create_file/chrome_create_file_unittest.cc',
75         'elf_imports_unittest.cc',
76         'ntdll_cache_unittest.cc',
77       ],
78       'include_dirs': [
79         '..',
80         '<(SHARED_INTERMEDIATE_DIR)',
81       ],
82       'dependencies': [
83         'chrome_elf_lib',
84         '../base/base.gyp:base',
85         '../base/base.gyp:run_all_unittests',
86         '../base/base.gyp:test_support_base',
87         '../sandbox/sandbox.gyp:sandbox',
88         '../testing/gtest.gyp:gtest',
89         'blacklist',
90         'blacklist_test_dll_1',
91         'blacklist_test_dll_2',
92         'blacklist_test_dll_3',
93         'blacklist_test_main_dll',
94       ],
95     },
96     {
97       # A dummy target to ensure that chrome_elf.dll and chrome.exe gets built
98       # when building chrome_elf_unittests.exe without introducing an
99       # explicit runtime dependency.
100       'target_name': 'chrome_elf_unittests',
101       'type': 'none',
102       'dependencies': [
103         '../chrome/chrome.gyp:chrome',
104         'chrome_elf',
105         'chrome_elf_unittests_exe',
106       ],
107     },
108     {
109       'target_name': 'chrome_elf_lib',
110       'type': 'static_library',
111       'include_dirs': [
112         '..',
113       ],
114       'sources': [
115         'create_file/chrome_create_file.cc',
116         'create_file/chrome_create_file.h',
117         'ntdll_cache.cc',
118         'ntdll_cache.h',
119       ],
120       'dependencies': [
121         'chrome_elf_common',
122         '../base/base.gyp:base_static',
123         '../sandbox/sandbox.gyp:sandbox',
124       ],
125     },
126     {
127       'target_name': 'chrome_elf_constants',
128       'type': 'static_library',
129       'include_dirs': [
130         '..',
131       ],
132       'sources': [
133         'chrome_elf_constants.cc',
134         'chrome_elf_constants.h',
135       ],
136     },
137     {
138       'target_name': 'chrome_elf_common',
139       'type': 'static_library',
140       'dependencies': [
141         'chrome_elf_constants',
142       ],
143       'include_dirs': [
144         '..',
145       ],
146       'sources': [
147         'chrome_elf_types.h',
148         'chrome_elf_util.cc',
149         'chrome_elf_util.h',
150         'thunk_getter.cc',
151         'thunk_getter.h',
152       ],
153     },
154     {
155       'target_name': 'chrome_elf_breakpad',
156       'type': 'static_library',
157       'include_dirs': [
158         '..',
159         '<(SHARED_INTERMEDIATE_DIR)',
160       ],
161       'sources': [
162         'breakpad.cc',
163         'breakpad.h',
164       ],
165       'dependencies': [
166         'chrome_elf_common',
167         '../breakpad/breakpad.gyp:breakpad_handler',
168         '../chrome/chrome.gyp:chrome_version_header',
169       ],
170     },
171   ], # targets
172   'conditions': [
173     ['component=="shared_library"', {
174       'targets': [
175         {
176           'target_name': 'chrome_redirects',
177           'type': 'shared_library',
178           'include_dirs': [
179             '..',
180           ],
181           'sources': [
182             'chrome_redirects.def',
183             'chrome_redirects_main.cc',
184           ],
185           'dependencies': [
186             'chrome_elf_lib',
187           ],
188           'msvs_settings': {
189             'VCLinkerTool': {
190               'conditions': [
191                 ['target_arch=="ia32"', {
192                   # Don't set an x64 base address (to avoid breaking HE-ASLR).
193                   'BaseAddress': '0x01c20000',
194                 }],
195               ],
196               # Set /SUBSYSTEM:WINDOWS.
197               'SubSystem': '2',
198             },
199           },
200         },
201       ],
202     }],
203   ],