summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/SConscript8
-rw-r--r--src/glsl/SConscript8
2 files changed, 15 insertions, 1 deletions
diff --git a/src/SConscript b/src/SConscript
index d5cde1c9642..f11894f2990 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -1,9 +1,17 @@
Import('*')
+
if env['platform'] == 'windows':
SConscript('getopt/SConscript')
SConscript('glsl/SConscript')
+
+if env['hostonly']:
+ # We are just compiling the things necessary on the host for cross
+ # compilation
+ Return()
+
+
# When env['gles'] is set, the targets defined in mapi/glapi/SConscript are not
# used. libgl-xlib and libgl-gdi adapt themselves to use the targets defined
# in mapi/glapi-shared/SConscript. mesa/SConscript also adapts itself to
diff --git a/src/glsl/SConscript b/src/glsl/SConscript
index ca17ddd6a2c..7c6b6ae8c4d 100644
--- a/src/glsl/SConscript
+++ b/src/glsl/SConscript
@@ -82,7 +82,9 @@ sources = [
]
-if not env['crosscompile'] or env['platform'] == 'embedded':
+if env['crosscompile'] and env['platform'] != 'embedded':
+ Import('builtin_glsl_function')
+else:
if env['msvc']:
env.Prepend(CPPPATH = ['#/src/getopt'])
env.PrependUnique(LIBS = [getopt])
@@ -105,6 +107,10 @@ if not env['crosscompile'] or env['platform'] == 'embedded':
Export('builtin_glsl_function')
+ if env['hostonly']:
+ Return()
+
+
sources += builtin_glsl_function
glsl = env.ConvenienceLibrary(