Merge remote branch 'origin/master' into pipe-video
[mesa.git] / src / glsl / SConscript
index 2cc7b0eda7a4ca0878dc50ddcb624456e8d9c0b5..7c6b6ae8c4df80541653cf1a257c3424a2933fa2 100644 (file)
@@ -64,6 +64,7 @@ sources = [
     'opt_constant_propagation.cpp',
     'opt_constant_variable.cpp',
     'opt_copy_propagation.cpp',
+    'opt_copy_propagation_elements.cpp',
     'opt_dead_code.cpp',
     'opt_dead_code_local.cpp',
     'opt_dead_functions.cpp',
@@ -81,7 +82,9 @@ sources = [
 ] 
 
 
-if env['platform'] == common.host_platform:
+if env['crosscompile'] and env['platform'] != 'embedded':
+    Import('builtin_glsl_function')
+else:
     if env['msvc']:
         env.Prepend(CPPPATH = ['#/src/getopt'])
         env.PrependUnique(LIBS = [getopt])
@@ -104,9 +107,10 @@ if env['platform'] == common.host_platform:
 
     Export('builtin_glsl_function')
 
-    if common.cross_compiling:
+    if env['hostonly']:
         Return()
 
+
 sources += builtin_glsl_function
 
 glsl = env.ConvenienceLibrary(