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

Unified Diff: src/trusted/validator/x86/decoder/build.scons

Issue 636933004: stop building/testing old x86 validator. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: rebase master Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/trusted/validator/x86/build.scons ('k') | src/trusted/validator/x86/decoder/generator/build.scons » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/validator/x86/decoder/build.scons
diff --git a/src/trusted/validator/x86/decoder/build.scons b/src/trusted/validator/x86/decoder/build.scons
deleted file mode 100644
index 78d07a4d1bea0a4adf0d63edb23d9a3447cf0a0b..0000000000000000000000000000000000000000
--- a/src/trusted/validator/x86/decoder/build.scons
+++ /dev/null
@@ -1,150 +0,0 @@
-# -*- python -*-
-# Copyright (c) 2011 The Native Client Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-
-import os
-import sys
-Import('env')
-
-#
-#
-# Build x86 only pieces
-#
-#
-if not env.Bit('target_x86'): Return()
-
-# TODO(bradchen): eliminate need for the following line
-env.FilterOut(CCFLAGS=['-Wextra', '-Wswitch-enum', '-Wsign-compare'])
-
-#----------- FILE GENERATION --------------------------
-#
-# Generates source files needed by the decoder.
-
-generate = False
-if 'valgen' in COMMAND_LINE_TARGETS: generate = True
-if 'valclean' in COMMAND_LINE_TARGETS: generate = True
-
-#
-# Only generate/clean these files if the alias is specified on the
-# command line. We conditionally add these pieces to scons to prevent
-# a normal invocation from accidentally regenerating the files.
-#
-if generate:
- #
- # valgen - Table Generator
- #
- # We create an alias 'valgen' which we use to generate the various
- # headers used by the x86 validator. This target will generate
- # *.h, *_impl.h from the *.enum files.
- #
-
- # Define environment for generating files.
- gen_env = env.Clone()
- gen_env.Append(CCFLAGS=['-DNACL_TRUSTED_BUT_NOT_TCB'])
-
- # Get the directory in which we will generate checking in files.
- header_prefix = env.subst('${MAIN_DIR}')
- if header_prefix.endswith('/native_client'):
- header_prefix = header_prefix[0:header_prefix.rfind('native_client')]
- elif header_prefix.endswith('/native_client/'):
- header_prefix = header_prefix[0:header_prefix.rfind('native_client/')]
- decoder_src_dir = '$MAIN_DIR/src/trusted/validator/x86/decoder'
-
- #------------------------------------------------------
- # Generate the needed header files for enumerated types.
- # Note that we use the same directory for all platforms.
-
- # Define enumerate type files, and the options to process.
- enum_headers = []
- ncv_enum_pairs = {
- 'ncopcode_prefix': '--name=NaClInstPrefix --add_size=1',
- 'ncopcode_insts':
- '--name=NaClMnemonic --add_size=1 --sort=1 --name_prefix=Inst',
- 'ncopcode_opcode_flags': '--name=NaClIFlag --add_size=1',
- 'ncopcode_operand_kind': '--name=NaClOpKind --add_size=1',
- 'ncopcode_operand_flag': '--name=NaClOpFlag --add_size=1',
- 'ncop_expr_node_flag': '--name=NaClExpFlag --add_size=1',
- 'ncop_expr_node_kind': '--name=NaClExpKind --add_size=1',
- }
-
- # Now code generate the enumerated types.
- for ncv_enum in ncv_enum_pairs:
- ncv_options = ncv_enum_pairs[ncv_enum]
- ncv_enum_file = gen_env.File(ncv_enum + '.enum')
- ncv_header_1 = gen_env.File('%s/gen/%s.h' % (decoder_src_dir, ncv_enum))
- ncv_header_2 = gen_env.File('%s/gen/%s_impl.h' % (decoder_src_dir, ncv_enum))
-
- cmd_line = (
- '${PYTHON} %s --header="%s" --source="%s" --path_prefix="%s" %s %s' %
- (gen_env.File('%s/../../../validator_x86/enum_gen.py' % decoder_src_dir),
- ncv_header_1, ncv_header_2, header_prefix,
- ncv_options, ncv_enum_file))
- gen_env.Command([ncv_header_1, ncv_header_2], ncv_enum_file, cmd_line)
- enum_headers.append(ncv_header_1)
- enum_headers.append(ncv_header_2)
-
- gen_list = enum_headers
- gen_env.AlwaysBuild(
- gen_env.Alias('valgen', gen_list))
- gen_env.AlwaysBuild(
- gen_env.Alias('valclean', action=[Delete(x) for x in gen_list]))
-
-#---------- TESTS --------------------------------------
-#
-# Create environment for command-line tools and testing, rather than
-# part of the TCB. Then define compile-time flag that communicates
-# that we are compiling in the test environment (rather than for the TCB).
-test_env = env.Clone()
-test_env.Append(CCFLAGS=['-DNACL_TRUSTED_BUT_NOT_TCB'])
-
-#---------- COMPONENTS BUILT ---------------------------
-
-# TODO(karl): merge nc_opcode_modeling and nc_decoder libraries.
-# Instruction modeling for the decoder.
-env.ComponentLibrary(env.NaClTargetArchSuffix('nc_opcode_modeling'),
- ['ncopcode_desc.c',
- ])
-
-# Verbose routines for instruction modeling for the decoder.
-env.ComponentLibrary(env.NaClTargetArchSuffix('nc_opcode_modeling_verbose'),
- ['ncopcode_desc_verbose.c',
- ])
-
-# Decoder library.
-env.ComponentLibrary(env.NaClTargetArchSuffix('nc_decoder'),
- ['nc_inst_iter.c',
- 'nc_inst_state.c',
- 'nc_inst_trans.c',
- 'ncop_exps.c',
- ])
-
-# Full decoder tables.
-env.ComponentLibrary(env.NaClTargetArchSuffix('ncdis_decode_tables'),
- ['ncdis_decode_tables.c'])
-
-#---------- UNIT TESTS ---------------------------------
-
-# Create an environment to run unit tests using Gtest.
-gtest_env = env.MakeGTestEnv()
-
-# List of (unit) test file prefixes to run unit tests on.
-gtest_sources = ['nc_inst_state']
-
-for source in gtest_sources:
- test_exe = gtest_env.ComponentProgram(
- 'x86_decoder_tests_' + source,
- [source+'_tests.cc'],
- EXTRA_LIBS=[# Note: The following forces the inclusion
- # of kNaClDecoderTables
- gtest_env.NaClTargetArchSuffix('ncval_seg_sfi'),
- gtest_env.NaClTargetArchSuffix('nc_decoder'),
- gtest_env.NaClTargetArchSuffix('ncdis_decode_tables'),
- gtest_env.NaClTargetArchSuffix('nc_opcode_modeling_verbose'),
- ])
- test_node = gtest_env.CommandTest(
- source+'Tests.out',
- command=[test_exe])
- gtest_env.AddNodeToTestSuite(test_node, ['small_tests'],
- 'run_x86_validator_tests')
« no previous file with comments | « src/trusted/validator/x86/build.scons ('k') | src/trusted/validator/x86/decoder/generator/build.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698