Home | History | Annotate | Download | only in base
      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             'base.gyp:base_debugging_flags',
     44           ],
     45         },
     46         {
     47           'target_name': 'base_i18n_nacl',
     48           'type': 'none',
     49           'variables': {
     50             'base_i18n_target': 1,
     51             'nacl_untrusted_build': 1,
     52             'nlib_target': 'libbase_i18n_nacl.a',
     53             'build_glibc': 0,
     54             'build_newlib': 0,
     55             'build_irt': 0,
     56             'build_pnacl_newlib': 1,
     57             'sources': [
     58               'base_switches.cc',
     59               'base_switches.h',
     60               'strings/string16.cc',
     61               'sync_socket_nacl.cc',
     62               'time/time_posix.cc',
     63             ],
     64           },
     65           'dependencies': [
     66             '../third_party/icu/icu_nacl.gyp:icudata_nacl',
     67             '../third_party/icu/icu_nacl.gyp:icui18n_nacl',
     68             '../third_party/icu/icu_nacl.gyp:icuuc_nacl',
     69           ],
     70         },
     71         {
     72           'target_name': 'base_nacl_nonsfi',
     73           'type': 'none',
     74           'variables': {
     75             'base_target': 1,
     76             'nacl_untrusted_build': 1,
     77             'nlib_target': 'libbase_nacl_nonsfi.a',
     78             'build_glibc': 0,
     79             'build_newlib': 0,
     80             'build_irt': 0,
     81             'build_pnacl_newlib': 0,
     82             'build_nonsfi_helper': 1,
     83 
     84             'sources': [
     85               'base_switches.cc',
     86               'base_switches.h',
     87 
     88               # For PathExists and ReadFromFD.
     89               'files/file_util.cc',
     90               'files/file_util_posix.cc',
     91 
     92               # For MessageLoopForIO based on libevent.
     93               'message_loop/message_pump_libevent.cc',
     94               'message_loop/message_pump_libevent.h',
     95 
     96               # For UnixDomainSocket::SendMsg and RecvMsg.
     97               'posix/unix_domain_socket_linux.cc',
     98 
     99               # For GetKnownDeadTerminationStatus and GetTerminationStatus.
    100               'process/kill_posix.cc',
    101 
    102               # For ForkWithFlags.
    103               'process/launch.h',
    104               'process/launch_posix.cc',
    105 
    106               # Unlike libbase_nacl, for Non-SFI build, we need to use
    107               # rand_util_posix for random implementation, instead of
    108               # rand_util_nacl.cc, which is based on IRT. rand_util_nacl.cc is
    109               # excluded below.
    110               'rand_util_posix.cc',
    111 
    112               # For CancelableSyncSocket.
    113               'sync_socket_nacl.cc',
    114             ],
    115           },
    116           'sources!': [
    117             'rand_util_nacl.cc',
    118           ],
    119           'dependencies': [
    120             'base.gyp:base_debugging_flags',
    121             'third_party/libevent/libevent_nacl_nonsfi.gyp:event_nacl_nonsfi',
    122           ],
    123         },
    124         {
    125           'target_name': 'test_support_base_nacl_nonsfi',
    126           'type': 'none',
    127           'variables': {
    128             'nacl_untrusted_build': 1,
    129             'nlib_target': 'libtest_support_base_nacl_nonsfi.a',
    130             'build_glibc': 0,
    131             'build_newlib': 0,
    132             'build_irt': 0,
    133             'build_pnacl_newlib': 0,
    134             'build_nonsfi_helper': 1,
    135 
    136             'sources': [
    137               'test/gtest_util.cc',
    138               'test/launcher/unit_test_launcher_nacl_nonsfi.cc',
    139               'test/gtest_xml_unittest_result_printer.cc',
    140               'test/test_switches.cc',
    141             ],
    142           },
    143           'dependencies': [
    144             'base_nacl_nonsfi',
    145             '../testing/gtest_nacl.gyp:gtest_nacl',
    146           ],
    147         },
    148       ],
    149     }],
    150   ],
    151 }
    152