summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct34
1 files changed, 33 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index c6198041fb0..368ad83edf3 100644
--- a/SConstruct
+++ b/SConstruct
@@ -32,7 +32,6 @@ import common
opts = Variables('config.py')
common.AddOptions(opts)
-opts.Add(EnumVariable('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0')))
env = Environment(
options = opts,
@@ -120,6 +119,39 @@ Export('env')
#######################################################################
+# Invoke host SConscripts
+#
+# For things that are meant to be run on the native host build machine, instead
+# of the target machine.
+#
+
+# Create host environent
+if env['platform'] != common.host_platform:
+ host_env = Environment(
+ options = opts,
+ # no tool used
+ tools = [],
+ toolpath = ['#scons'],
+ ENV = os.environ,
+ )
+
+ # Override options
+ host_env['platform'] = common.host_platform
+ host_env['machine'] = common.host_machine
+ host_env['toolchain'] = 'default'
+ host_env['llvm'] = False
+
+ host_env.Tool('gallium')
+
+ SConscript(
+ 'src/glsl/SConscript',
+ variant_dir = host_env['build_dir'],
+ duplicate = 0, # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
+ exports={'env':host_env},
+ )
+
+
+#######################################################################
# Invoke SConscripts
# TODO: Build several variants at the same time?