summaryrefslogtreecommitdiffstats
path: root/mojo/mojo_nacl_untrusted.gyp
blob: 4054b32ca6e420fe8dbb401b07037b5b00a600be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

{
  'conditions': [
    ['disable_nacl==0 and disable_nacl_untrusted==0', {
      'includes': [
        '../build/common_untrusted.gypi',
        '../mojo/mojo_nacl.gypi',
        '../third_party/mojo/mojo_variables.gypi',
      ],
      'targets': [
        {
          'target_name': 'libmojo',
          'type': 'none',
          'variables': {
            'nlib_target': 'libmojo.a',
            'build_glibc': 0,
            'build_newlib': 0,
            'build_pnacl_newlib': 1,
          },
          'sources': [
            '<(monacl_codegen_dir)/libmojo.cc',
          ],
          'dependencies': [
            'mojo_nacl.gyp:monacl_codegen',
            '../third_party/mojo/mojo_public.gyp:mojo_system_placeholder',
          ],
        },
        {
          'target_name': 'libmojo_irt',
          'type': 'none',
          'variables': {
            'nlib_target': 'libmojo_irt.a',
            'build_glibc': 0,
            'build_newlib': 0,
            'build_pnacl_newlib': 0,
            'build_irt': 1,
          },
          'sources': [
            '<(monacl_codegen_dir)/mojo_irt.c',
            '<(monacl_codegen_dir)/mojo_irt.h',
          ],
          'dependencies': [
            'mojo_nacl.gyp:monacl_codegen',
          ],
          'direct_dependent_settings': {
            'include_dirs': [
              '../third_party/mojo/src',
            ],
          },
        },
        {
          'target_name': 'monacl_test',
          'type': 'none',
          'variables': {
            'nexe_target': 'monacl_test',
            'build_newlib': 0,
            'build_pnacl_newlib': 1,
            'translate_pexe_with_build': 1,
            'link_flags': [
              '-pthread',
              '-lmojo',
              '-limc_syscalls',
            ],
            'sources': [
              '<@(mojo_public_system_unittest_sources)',
            ],
          },
          'dependencies': [
            '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:nacl_lib',
            '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:imc_syscalls_lib',
            '<(DEPTH)/native_client/src/untrusted/pthread/pthread.gyp:pthread_lib',
            '../testing/gtest_nacl.gyp:gtest_nacl',
            '../testing/gtest_nacl.gyp:gtest_main_nacl',
            'libmojo',
            'mojo_nacl.gyp:monacl_codegen',
          ],
        },
      ],
    }],
  ],
}