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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: src/trusted/validator_ragel/build.scons
diff --git a/src/trusted/validator_ragel/build.scons b/src/trusted/validator_ragel/build.scons
index f954dec9b6ba4e3f496af2fa422ee2e651f6428f..b9873f35bf82f689b0133ff2cbb7d5872be8e4cc 100644
--- a/src/trusted/validator_ragel/build.scons
+++ b/src/trusted/validator_ragel/build.scons
@@ -124,18 +124,35 @@ if generate:
env.AlwaysBuild(env.Alias('valgen', automatas))
env.AlwaysBuild(env.Alias('valclean', action=[Delete(x) for x in automatas]))
-# Generate 32 and 64 bit versions of decoders and validators.
+# Generate 32 and 64 bit versions of decoders and validators. Both libraries
+# are used for command-line decoder and validator those detect specific
+# architecture of the ELF file provided.
for bits in ['32', '64']:
- for automata in ['decoder', 'validator']:
- env.ComponentLibrary('%s_x86_%s' % (automata, bits),
- ['gen/%s-x86_%s.c' % (automata, bits)])
-
+ env.ComponentLibrary('dfa_validate_x86_%s' % bits,
+ ['gen/validator-x86_%s.c' % bits])
+ env.ComponentLibrary('dfa_decode_x86_%s' % bits,
+ ['gen/decoder-x86_%s.c' % bits])
+
+# Glue library called from service runtime. The source file depends on the
+# target architecture.
+caller_lib_bits = None
+if env.Bit('target_x86_32'):
+ caller_lib_bits = '32'
+if env.Bit('target_x86_64'):
+ caller_lib_bits = '64'
+if caller_lib_bits:
+ caller_lib = 'dfa_validate_caller_x86_%s' % caller_lib_bits
+ env.ComponentLibrary(caller_lib,
+ ['unreviewed/dfa_validate_%s.c' % caller_lib_bits])
+
+# Command-line decoder.
env.ComponentProgram(
'decoder-test',
['unreviewed/decoder-test.c'],
- EXTRA_LIBS=['decoder_x86_32', 'decoder_x86_64'])
+ EXTRA_LIBS=['dfa_decode_x86_32', 'dfa_decode_x86_64'])
+# Command-line validator.
env.ComponentProgram(
'validator-test',
['unreviewed/validator-test.c'],
- EXTRA_LIBS=['validator_x86_32', 'validator_x86_64'])
+ EXTRA_LIBS=['dfa_validate_x86_32', 'dfa_validate_x86_64'])
« 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