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

Side by Side Diff: chrome/test/data/nacl/nacl_browser_test.gypi

Issue 10828376: Refactor the GYP build for the NaCl smoke test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/data/nacl/nacl_test_data.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright (c) 2012 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.
4
5 {
6 'includes': [
7 '../../../../native_client/build/untrusted.gypi',
8 ],
9 'target_defaults': {
10 # We need to override the variables in untrusted.gypi outside of a
11 # target_condition block because the target_condition block in
12 # untrusted gypi is fully evaluated and interpolated before any of the
13 # target_condition blocks in this file are expanded. This means that any
14 # variables overriden inside a target_condition block in this file will not
15 # affect the values in untrusted.gypi.
16 'variables': {
17 'test_files': [],
18 'nacl_newlib_out_dir': '<(PRODUCT_DIR)/nacl_test_data/newlib',
19 'out_newlib32': '>(nacl_newlib_out_dir)/>(nexe_target)_newlib_x86_32.nexe' ,
20 'out_newlib64': '>(nacl_newlib_out_dir)/>(nexe_target)_newlib_x86_64.nexe' ,
21 'out_newlib_arm': '>(nacl_newlib_out_dir)/>(nexe_target)_newlib_arm.nexe',
22 'nmf_newlib': '>(nacl_newlib_out_dir)/>(nexe_target).nmf',
23 'nacl_glibc_out_dir': '<(PRODUCT_DIR)/nacl_test_data/glibc',
24 'out_glibc32': '>(nacl_glibc_out_dir)/>(nexe_target)_glibc_x86_32.nexe',
25 'out_glibc64': '>(nacl_glibc_out_dir)/>(nexe_target)_glibc_x86_64.nexe',
26 'out_glibc_arm': '>(nacl_glibc_out_dir)/>(nexe_target)_glibc_arm.nexe',
27 'nmf_glibc': '>(nacl_glibc_out_dir)/>(nexe_target).nmf',
28 },
29 'dependencies': [
30 '<(DEPTH)/ppapi/ppapi_untrusted.gyp:ppapi_cpp_lib',
31 '<(DEPTH)/ppapi/native_client/native_client.gyp:ppapi_lib',
32 ],
33 'target_conditions': [
34 ['test_files!=[] and build_newlib==1', {
35 'copies': [
36 {
37 'destination': '>(nacl_newlib_out_dir)',
38 'files': [
39 '>@(test_files)',
40 ],
41 },
42 ],
43 }],
44 ['test_files!=[] and "<(target_arch)"!="arm" and disable_glibc==0 and buil d_glibc==1', {
45 'copies': [
46 {
47 'destination': '>(nacl_glibc_out_dir)',
48 'files': [
49 '>@(test_files)',
50 ],
51 },
52 ],
53 }],
54 ['nexe_target!=""', {
55 'variables': {
56 # Patch over the fact that untrusted.gypi doesn't define these in all
57 # cases.
58 'enable_x86_64%': 0,
59 'enable_x86_32%': 0,
60 'enable_arm%': 0,
61 'include_dirs': [
62 '<(DEPTH)',
63 ],
64 'link_flags': [
65 '-lppapi_cpp',
66 '-lppapi',
67 '-lpthread',
68 ],
69 },
70 'target_conditions': [
71 ['build_newlib==1', {
72 'actions': [
73 {
74 'action_name': 'Generate NEWLIB NMF',
75 # Unlike glibc, nexes are not actually inputs - only the names m atter.
76 # We don't have the nexes as inputs because the ARM nexe may not
77 # exist. However, VS 2010 seems to blackhole this entire target if
78 # there are no inputs to this action. To work around this we ad d a
79 # bogus input.
80 'inputs': [],
81 'outputs': ['>(nmf_newlib)'],
82 'action': [
83 'python',
84 '<(DEPTH)/native_client_sdk/src/tools/create_nmf.py',
85 '>@(_inputs)',
86 '--output=>(nmf_newlib)',
87 '--toolchain=newlib',
88 ],
89 'target_conditions': [
90 ['enable_x86_64==1', {
91 'inputs': ['>(out_newlib64)'],
92 }],
93 ['enable_x86_32==1', {
94 'inputs': ['>(out_newlib32)'],
95 }],
96 ['enable_arm==1', {
97 'inputs': ['>(out_newlib_arm)'],
98 }],
99 ],
100 },
101 ],
102 }],
103 ['"<(target_arch)"!="arm" and disable_glibc==0 and build_glibc==1', {
104 'variables': {
105 # NOTE: Use /lib, not /lib64 here; it is a symbolic link which
106 # doesn't work on Windows.
107 'libdir_glibc64': '>(nacl_glibc_tc_root)/x86_64-nacl/lib',
108 'libdir_glibc32': '>(nacl_glibc_tc_root)/x86_64-nacl/lib32',
109 'nacl_objdump': '>(nacl_glibc_tc_root)/bin/x86_64-nacl-objdump',
110 },
111 'actions': [
112 {
113 'action_name': 'Generate GLIBC NMF and copy libs',
114 'inputs': [],
115 # NOTE: There is no explicit dependency for the lib32
116 # and lib64 directories created in the PRODUCT_DIR.
117 # They are created as a side-effect of NMF creation.
118 'outputs': ['>(nmf_glibc)'],
119 'action': [
120 'python',
121 '<(DEPTH)/native_client_sdk/src/tools/create_nmf.py',
122 '>@(_inputs)',
123 '--objdump=>(nacl_objdump)',
124 '--output=>(nmf_glibc)',
125 '--stage-dependencies=<(nacl_glibc_out_dir)',
126 '--toolchain=glibc',
127 ],
128 'target_conditions': [
129 ['enable_x86_64==1', {
130 'inputs': ['>(out_glibc64)'],
131 'action': ['--library-path=>(libdir_glibc64)'],
132 }],
133 ['enable_x86_32==1', {
134 'inputs': ['>(out_glibc32)'],
135 'action': ['--library-path=>(libdir_glibc32)'],
136 }],
137 # TODO(ncbray) handle arm case. We don't have ARM glibc yet.
138 ],
139 },
140 ],
141 }],
142 ],
143 }],
144 ],
145 },
146 }
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/data/nacl/nacl_test_data.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698