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
This commit is contained in:
parent
ce7210ece0
commit
c2c5482c9b
@ -450,6 +450,7 @@ def BuildSpecific(env, mode, env_overrides):
|
||||
for sample in context.samples:
|
||||
sample_env = Environment(LIBRARY=library_name)
|
||||
sample_env.Replace(**context.flags['sample'])
|
||||
sample_env['ENV'].update(**context.env_overrides)
|
||||
sample_object = sample_env.SConscript(
|
||||
join('samples', 'SConscript'),
|
||||
build_dir=join('obj', 'sample', sample, target_id),
|
||||
|
@ -53,6 +53,7 @@ def Build():
|
||||
cctest_files = context.GetRelevantSources(SOURCES)
|
||||
env = Environment()
|
||||
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
|
||||
# PDB files when compiling using MSVC so we specify it manually.
|
||||
# This should not affect any other platforms.
|
||||
|
@ -490,8 +490,10 @@ def RunTestCases(all_cases, progress):
|
||||
return progress.Run()
|
||||
|
||||
|
||||
def BuildRequirements(context, requirements, mode):
|
||||
command_line = ['scons', '-Y', context.workspace, 'mode=' + ",".join(mode)] + requirements
|
||||
def BuildRequirements(context, requirements, mode, scons_flags):
|
||||
command_line = (['scons', '-Y', context.workspace, 'mode=' + ",".join(mode)]
|
||||
+ requirements
|
||||
+ scons_flags)
|
||||
output = ExecuteNoCapture(command_line, context)
|
||||
return output.exit_code == 0
|
||||
|
||||
@ -921,6 +923,8 @@ def BuildOptions():
|
||||
default='release')
|
||||
result.add_option("-v", "--verbose", help="Verbose output",
|
||||
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",
|
||||
help="The style of progress indicator (verbose, dots, color, mono)",
|
||||
choices=PROGRESS_INDICATORS.keys(), default="mono")
|
||||
@ -1026,7 +1030,7 @@ def Main():
|
||||
reqs += root.GetBuildRequirements(path, context)
|
||||
reqs = list(set(reqs))
|
||||
if len(reqs) > 0:
|
||||
if not BuildRequirements(context, reqs, options.mode):
|
||||
if not BuildRequirements(context, reqs, options.mode, options.scons_flags):
|
||||
return 1
|
||||
|
||||
# Get status for tests
|
||||
|
Loading…
Reference in New Issue
Block a user