瀏覽代碼

scons: Build nir/glsl_types.cpp once.

Undoes early hacks, and ensures nir/glsl_types.cpp is built once, and
only once.

The root problem is that SCons doesn't know about NIR nor any source
file in the NIR_FILES source list.

Tested with libgl-gdi and libgl-xlib scons targets.

Reviewed-by: Brian Paul <brianp@vmware.com>
tags/11.1-branchpoint
Jose Fonseca 10 年之前
父節點
當前提交
b23a4859f4

+ 1
- 9
src/gallium/targets/libgl-gdi/SConscript 查看文件

@@ -7,10 +7,6 @@ env = env.Clone()

env.Append(CPPPATH = [
'#src',
'#src/mesa',
'#src/mapi',
'#src/glsl',
'#src/glsl/nir',
'#src/gallium/state_trackers/wgl',
'#src/gallium/winsys/sw',
])
@@ -24,11 +20,7 @@ env.Append(LIBS = [

env.Prepend(LIBS = [mesautil])

sources = [
'libgl_gdi.c',
'glsl_types_hack.cpp'
]

sources = ['libgl_gdi.c']
drivers = []

if True:

+ 0
- 3
src/gallium/targets/libgl-gdi/glsl_types_hack.cpp 查看文件

@@ -1,3 +0,0 @@
/* errrg scons.. otherwise "scons: *** Two environments with different actions were specified for the same target: $mesa/build/linux-x86_64-debug/glsl/nir/glsl_types.os" */
#include "glsl_types.cpp"


+ 0
- 3
src/gallium/targets/libgl-xlib/SConscript 查看文件

@@ -6,8 +6,6 @@ Import('*')
env = env.Clone()

env.Append(CPPPATH = [
'#/src/glsl',
'#/src/glsl/nir',
'#/src/mapi',
'#/src/mesa',
'#/src/mesa/main',
@@ -38,7 +36,6 @@ env.Prepend(LIBS = [

sources = [
'xlib.c',
'glsl_types_hack.cpp',
]

if True:

+ 0
- 3
src/gallium/targets/libgl-xlib/glsl_types_hack.cpp 查看文件

@@ -1,3 +0,0 @@
/* errrg scons.. otherwise "scons: *** Two environments with different actions were specified for the same target: $mesa/build/linux-x86_64-debug/glsl/nir/glsl_types.os" */
#include "glsl_types.cpp"


+ 1
- 6
src/gallium/targets/osmesa/SConscript 查看文件

@@ -5,8 +5,6 @@ env = env.Clone()
env.Prepend(CPPPATH = [
'#src/mapi',
'#src/mesa',
'#src/glsl',
'#src/glsl/nir',
#Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers
])

@@ -24,10 +22,7 @@ env.Prepend(LIBS = [

env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_SOFTPIPE'])

sources = [
'target.c',
'glsl_types_hack.cpp'
]
sources = ['target.c']

if env['llvm']:
env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')

+ 0
- 3
src/gallium/targets/osmesa/glsl_types_hack.cpp 查看文件

@@ -1,3 +0,0 @@
/* errrg scons.. otherwise "scons: *** Two environments with different actions were specified for the same target: $mesa/build/linux-x86_64-debug/glsl/nir/glsl_types.os" */
#include "glsl_types.cpp"


+ 6
- 1
src/glsl/SConscript 查看文件

@@ -61,6 +61,12 @@ source_lists = env.ParseSourceList('Makefile.sources')
for l in ('LIBGLCPP_FILES', 'LIBGLSL_FILES'):
glsl_sources += source_lists[l]

# add nir/glsl_types.cpp manually, because SCons still doesn't know about NIR.
# XXX: Remove this once we build NIR and NIR_FILES.
glsl_sources += [
'nir/glsl_types.cpp',
]

if env['msvc']:
env.Prepend(CPPPATH = ['#/src/getopt'])
env.PrependUnique(LIBS = [getopt])
@@ -81,7 +87,6 @@ mesa_objs = env.StaticObject([
'prog_hash_table.c',
'symbol_table.c',
'dummy_errors.c',
'nir/glsl_types.cpp',
])

compiler_objs += mesa_objs

+ 0
- 1
src/mesa/drivers/x11/SConscript 查看文件

@@ -33,7 +33,6 @@ sources = [
'xm_dd.c',
'xm_line.c',
'xm_tri.c',
'../../../glsl/nir/glsl_types.cpp',
]

# Disallow undefined symbols

Loading…
取消
儲存