Commit c2c5482c authored by sgjesse@gmail.com's avatar sgjesse@gmail.com

Add the SCons environment override to the building of the samples and

the tests.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@95 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent ce7210ec
...@@ -450,6 +450,7 @@ def BuildSpecific(env, mode, env_overrides): ...@@ -450,6 +450,7 @@ def BuildSpecific(env, mode, env_overrides):
for sample in context.samples: for sample in context.samples:
sample_env = Environment(LIBRARY=library_name) sample_env = Environment(LIBRARY=library_name)
sample_env.Replace(**context.flags['sample']) sample_env.Replace(**context.flags['sample'])
sample_env['ENV'].update(**context.env_overrides)
sample_object = sample_env.SConscript( sample_object = sample_env.SConscript(
join('samples', 'SConscript'), join('samples', 'SConscript'),
build_dir=join('obj', 'sample', sample, target_id), build_dir=join('obj', 'sample', sample, target_id),
......
...@@ -53,6 +53,7 @@ def Build(): ...@@ -53,6 +53,7 @@ def Build():
cctest_files = context.GetRelevantSources(SOURCES) cctest_files = context.GetRelevantSources(SOURCES)
env = Environment() env = Environment()
env.Replace(**context.flags['cctest']) env.Replace(**context.flags['cctest'])
env['ENV'].update(**context.env_overrides)
# There seems to be a glitch in the way scons decides where to put # There seems to be a glitch in the way scons decides where to put
# PDB files when compiling using MSVC so we specify it manually. # PDB files when compiling using MSVC so we specify it manually.
# This should not affect any other platforms. # This should not affect any other platforms.
......
...@@ -490,8 +490,10 @@ def RunTestCases(all_cases, progress): ...@@ -490,8 +490,10 @@ def RunTestCases(all_cases, progress):
return progress.Run() return progress.Run()
def BuildRequirements(context, requirements, mode): def BuildRequirements(context, requirements, mode, scons_flags):
command_line = ['scons', '-Y', context.workspace, 'mode=' + ",".join(mode)] + requirements command_line = (['scons', '-Y', context.workspace, 'mode=' + ",".join(mode)]
+ requirements
+ scons_flags)
output = ExecuteNoCapture(command_line, context) output = ExecuteNoCapture(command_line, context)
return output.exit_code == 0 return output.exit_code == 0
...@@ -921,6 +923,8 @@ def BuildOptions(): ...@@ -921,6 +923,8 @@ def BuildOptions():
default='release') default='release')
result.add_option("-v", "--verbose", help="Verbose output", result.add_option("-v", "--verbose", help="Verbose output",
default=False, action="store_true") default=False, action="store_true")
result.add_option("-S", dest="scons_flags", help="Flag to pass through to scons",
default=[], action="append")
result.add_option("-p", "--progress", result.add_option("-p", "--progress",
help="The style of progress indicator (verbose, dots, color, mono)", help="The style of progress indicator (verbose, dots, color, mono)",
choices=PROGRESS_INDICATORS.keys(), default="mono") choices=PROGRESS_INDICATORS.keys(), default="mono")
...@@ -1026,7 +1030,7 @@ def Main(): ...@@ -1026,7 +1030,7 @@ def Main():
reqs += root.GetBuildRequirements(path, context) reqs += root.GetBuildRequirements(path, context)
reqs = list(set(reqs)) reqs = list(set(reqs))
if len(reqs) > 0: if len(reqs) > 0:
if not BuildRequirements(context, reqs, options.mode): if not BuildRequirements(context, reqs, options.mode, options.scons_flags):
return 1 return 1
# Get status for tests # Get status for tests
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment