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

Side by Side Diff: src/trusted/validator_ragel/build.scons

Issue 10070010: validator_ragel: Link into TCB, use under env var (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: revert introducing extra empty line Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # -*- python -*- 1 # -*- python -*-
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 Import('env') 6 Import('env')
7 7
8 # 8 #
9 # 9 #
10 # Build on x86 only. 10 # Build on x86 only.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 target=c_file, 117 target=c_file,
118 source=['unreviewed/%s-x86_%s.rl' % (automata, bits), rl_file], 118 source=['unreviewed/%s-x86_%s.rl' % (automata, bits), rl_file],
119 action=['ragel -G2 -I%s ${SOURCES[0]} -o ${TARGET}' % (rl_src_dir)] 119 action=['ragel -G2 -I%s ${SOURCES[0]} -o ${TARGET}' % (rl_src_dir)]
120 ) 120 )
121 automatas.append(c_file) 121 automatas.append(c_file)
122 122
123 # Generate 32 and 64 bit versions of decoders and validators 123 # Generate 32 and 64 bit versions of decoders and validators
124 env.AlwaysBuild(env.Alias('valgen', automatas)) 124 env.AlwaysBuild(env.Alias('valgen', automatas))
125 env.AlwaysBuild(env.Alias('valclean', action=[Delete(x) for x in automatas])) 125 env.AlwaysBuild(env.Alias('valclean', action=[Delete(x) for x in automatas]))
126 126
127 # Generate 32 and 64 bit versions of decoders and validators. 127 # Generate 32 and 64 bit versions of decoders and validators. Both libraries
128 # are used for command-line decoder and validator those detect specific
129 # architecture of the ELF file provided.
128 for bits in ['32', '64']: 130 for bits in ['32', '64']:
129 for automata in ['decoder', 'validator']: 131 env.ComponentLibrary('dfa_validate_x86_%s' % bits,
130 env.ComponentLibrary('%s_x86_%s' % (automata, bits), 132 ['gen/validator-x86_%s.c' % bits])
131 ['gen/%s-x86_%s.c' % (automata, bits)]) 133 env.ComponentLibrary('dfa_decode_x86_%s' % bits,
134 ['gen/decoder-x86_%s.c' % bits])
132 135
136 # Glue library called from service runtime. The source file depends on the
137 # target architecture.
138 caller_lib_bits = None
139 if env.Bit('target_x86_32'):
140 caller_lib_bits = '32'
141 if env.Bit('target_x86_64'):
142 caller_lib_bits = '64'
143 if caller_lib_bits:
144 caller_lib = 'dfa_validate_caller_x86_%s' % caller_lib_bits
145 env.ComponentLibrary(caller_lib,
146 ['unreviewed/dfa_validate_%s.c' % caller_lib_bits])
147
148 # Command-line decoder.
133 env.ComponentProgram( 149 env.ComponentProgram(
134 'decoder-test', 150 'decoder-test',
135 ['unreviewed/decoder-test.c'], 151 ['unreviewed/decoder-test.c'],
136 EXTRA_LIBS=['decoder_x86_32', 'decoder_x86_64']) 152 EXTRA_LIBS=['dfa_decode_x86_32', 'dfa_decode_x86_64'])
137 153
154 # Command-line validator.
138 env.ComponentProgram( 155 env.ComponentProgram(
139 'validator-test', 156 'validator-test',
140 ['unreviewed/validator-test.c'], 157 ['unreviewed/validator-test.c'],
141 EXTRA_LIBS=['validator_x86_32', 'validator_x86_64']) 158 EXTRA_LIBS=['dfa_validate_x86_32', 'dfa_validate_x86_64'])
OLDNEW
« no previous file with comments | « src/trusted/validator/x86/64/validator_x86_64.gyp ('k') | src/trusted/validator_ragel/dfa_validator_x86_32.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698