4 root_env = Environment(ENV = {'PATH': os.environ['PATH']})
7 if ARGUMENTS.get('V', '0') != '1':
8 root_env['CCCOMSTR'] = ' CC $TARGET'
9 root_env['RUSTCCOMSTR'] = ' RUSTC $TARGET'
10 root_env['LINKCOMSTR'] = ' LINK $TARGET'
11 root_env['ARCOMSTR'] = ' AR $TARGET'
12 root_env['RANLIBCOMSTR'] = ' RANLIB $TARGET'
13 root_env['OBJCOPYCOMSTR'] = ' OBJCOPY $TARGET'
15 # Make colored output of e.g. gcc work.
16 root_env['ENV']['TERM'] = os.environ.get('TERM')
18 root_env.Append(CCFLAGS = [
25 root_env.Append(RUSTC = 'rustc')
27 root_env.Append(BUILDERS = { 'Rustc': Builder(
28 action=Action('$RUSTC $RUSTCFLAGS -o $TARGET $SOURCE', '$RUSTCCOMSTR'))})
30 root_env.Append(BUILDERS = { 'Objcopy': Builder(
31 action=Action('$OBJCOPY -O binary $OBJCOPYFLAGS $SOURCES $TARGET', '$OBJCOPYCOMSTR'),
35 env = root_env.Clone()
36 env['variant_dir'] = 'build-target'
37 env['LIBPATH'] = env['variant_dir']
38 SConscript('SConscript.target', exports='env', variant_dir=env['variant_dir'], duplicate=0)