Upstream version 11.39.266.0
[platform/framework/web/crosswalk.git] / src / native_client / src / trusted / validator / x86 / ncval_reg_sfi / build.scons
1 # -*- python -*-
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6
7 import os
8 import sys
9 Import('env')
10
11 #
12 #
13 # Build x86 only pieces
14 #
15 #
16 if not env.Bit('target_x86'): Return()
17
18 # TODO(bradchen): eliminate need for the following line
19 env.FilterOut(CCFLAGS=['-Wextra', '-Wswitch-enum', '-Wsign-compare'])
20
21 # SFI validator library.
22 ncval_reg_sfi_sources = ['ncvalidate_iter.c',
23                          'ncvalidate_iter_detailed.c',
24                          'nc_cpu_checks.c',
25                          'nc_illegal.c',
26                          'nc_jumps.c',
27                          'address_sets.c',
28                          'nc_jumps_detailed.c',
29                          'nc_opcode_histogram.c',
30                          'nc_protect_base.c',
31                          'nc_memory_protect.c',
32                          'ncvalidate_utils.c',
33                          'ncval_decode_tables.c',
34                          ]
35
36 if env.Bit('ncval_testing'):
37   ncval_reg_sfi_sources.append('nc_postconds.c')
38
39 env.ComponentLibrary(env.NaClTargetArchSuffix('ncval_reg_sfi'),
40                      ncval_reg_sfi_sources)
41
42 # Verbose routines of SFI validator library.
43 env.ComponentLibrary(env.NaClTargetArchSuffix('ncval_reg_sfi_verbose'),
44                      ['ncvalidate_iter_verbose.c',
45                       ])