• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  'variables': {
7    'chromium_code': 1,
8  },
9  'includes': [
10    # base.gypi must be included before common_untrusted.gypi.
11    #
12    # TODO(sergeyu): Replace the target_defaults magic in base.gypi with a
13    # sources variables lists. That way order of includes will not matter.
14    'base.gypi',
15    '../build/common_untrusted.gypi',
16  ],
17  'conditions': [
18    ['disable_nacl==0 and disable_nacl_untrusted==0', {
19      'targets': [
20        {
21          'target_name': 'base_nacl',
22          'type': 'none',
23          'variables': {
24            'base_target': 1,
25            'nacl_untrusted_build': 1,
26            'nlib_target': 'libbase_nacl.a',
27            'build_glibc': 0,
28            'build_newlib': 0,
29            'build_irt': 1,
30            'build_pnacl_newlib': 1,
31            'sources': [
32              'base_switches.cc',
33              'base_switches.h',
34              'strings/string16.cc',
35              'sync_socket_nacl.cc',
36              'time/time_posix.cc',
37            ],
38            'compile_flags': [
39              '-fno-strict-aliasing',
40            ],
41          },
42          'dependencies': [
43            'allocator/allocator.gyp:allocator_features#target',
44            'base.gyp:base_debugging_flags',
45            'base.gyp:base_build_date',
46          ],
47        },
48        {
49          'target_name': 'base_i18n_nacl',
50          'type': 'none',
51          'variables': {
52            'base_i18n_target': 1,
53            'nacl_untrusted_build': 1,
54            'nlib_target': 'libbase_i18n_nacl.a',
55            'build_glibc': 0,
56            'build_newlib': 0,
57            'build_irt': 0,
58            'build_pnacl_newlib': 1,
59            'sources': [
60              'base_switches.cc',
61              'base_switches.h',
62              'strings/string16.cc',
63              'sync_socket_nacl.cc',
64              'time/time_posix.cc',
65            ],
66          },
67          'dependencies': [
68            'allocator/allocator.gyp:allocator_features#target',
69            'base.gyp:base_build_date',
70            '../third_party/icu/icu_nacl.gyp:icudata_nacl',
71            '../third_party/icu/icu_nacl.gyp:icui18n_nacl',
72            '../third_party/icu/icu_nacl.gyp:icuuc_nacl',
73          ],
74        },
75        {
76          'target_name': 'base_nacl_nonsfi',
77          'type': 'none',
78          'variables': {
79            'base_target': 1,
80            'nacl_untrusted_build': 1,
81            'nlib_target': 'libbase_nacl_nonsfi.a',
82            'build_glibc': 0,
83            'build_newlib': 0,
84            'build_irt': 0,
85            'build_pnacl_newlib': 0,
86            'build_nonsfi_helper': 1,
87
88            'sources': [
89              'base_switches.cc',
90              'base_switches.h',
91
92              # For PathExists and ReadFromFD.
93              'files/file_util.cc',
94              'files/file_util_posix.cc',
95
96              # For MessageLoopForIO based on libevent.
97              'message_loop/message_pump_libevent.cc',
98              'message_loop/message_pump_libevent.h',
99
100              # For UnixDomainSocket::SendMsg and RecvMsg.
101              'posix/unix_domain_socket_linux.cc',
102
103              # For GetKnownDeadTerminationStatus and GetTerminationStatus.
104              'process/kill_posix.cc',
105
106              # For ForkWithFlags.
107              'process/launch.h',
108              'process/launch_posix.cc',
109
110              # Unlike libbase_nacl, for Non-SFI build, we need to use
111              # rand_util_posix for random implementation, instead of
112              # rand_util_nacl.cc, which is based on IRT. rand_util_nacl.cc is
113              # excluded below.
114              'rand_util_posix.cc',
115
116              # For CancelableSyncSocket.
117              'sync_socket_nacl.cc',
118            ],
119          },
120          'sources!': [
121            'rand_util_nacl.cc',
122          ],
123          'dependencies': [
124            'allocator/allocator.gyp:allocator_features#target',
125            'base.gyp:base_debugging_flags',
126            'base.gyp:base_build_date',
127            'third_party/libevent/libevent_nacl_nonsfi.gyp:event_nacl_nonsfi',
128          ],
129        },
130        {
131          'target_name': 'test_support_base_nacl_nonsfi',
132          'type': 'none',
133          'variables': {
134            'nacl_untrusted_build': 1,
135            'nlib_target': 'libtest_support_base_nacl_nonsfi.a',
136            'build_glibc': 0,
137            'build_newlib': 0,
138            'build_irt': 0,
139            'build_pnacl_newlib': 0,
140            'build_nonsfi_helper': 1,
141
142            'sources': [
143              'test/gtest_util.cc',
144              'test/launcher/unit_test_launcher_nacl_nonsfi.cc',
145              'test/gtest_xml_unittest_result_printer.cc',
146              'test/test_switches.cc',
147            ],
148          },
149          'dependencies': [
150            'base.gyp:base_build_date',
151            'base_nacl_nonsfi',
152            '../testing/gtest_nacl.gyp:gtest_nacl',
153          ],
154        },
155      ],
156    }],
157  ],
158}
159