command : [prog_python2, '@INPUT0@', '@INPUT1@', '@OUTPUT@'],
)
+vtn_gather_types_c = custom_target(
+ 'vtn_gather_types.c',
+ input : files('../spirv/vtn_gather_types_c.py',
+ '../spirv/spirv.core.grammar.json'),
+ output : 'vtn_gather_types.c',
+ command : [prog_python2, '@INPUT0@', '@INPUT1@', '@OUTPUT@'],
+)
+
files_libnir = files(
'nir.c',
'nir.h',
'nir_lower_indirect_derefs.c',
'nir_lower_int64.c',
'nir_lower_io.c',
+ 'nir_lower_io_arrays_to_elements.c',
'nir_lower_io_to_temporaries.c',
'nir_lower_io_to_scalar.c',
'nir_lower_io_types.c',
libnir = static_library(
'nir',
[files_libnir, spirv_info_c, nir_opt_algebraic_c, nir_opcodes_c,
- nir_opcodes_h, nir_constant_expressions_c, nir_builder_opcodes_h],
+ nir_opcodes_h, nir_constant_expressions_c, nir_builder_opcodes_h,
+ vtn_gather_types_c],
include_directories : [inc_common, inc_compiler, include_directories('../spirv')],
c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
link_with : libcompiler,
build_by_default : false,
)
+# Headers-only dependency
+idep_nir_headers = declare_dependency(
+ sources : [nir_opcodes_h, nir_builder_opcodes_h],
+ include_directories : include_directories('.'),
+)
+
+# Also link with nir
+idep_nir = declare_dependency(
+ dependencies : idep_nir_headers,
+ link_with : libnir,
+)
+
nir_algebraic_py = files('nir_algebraic.py')
if with_tests
- nir_control_flow_test = executable(
- 'nir_control_flow_test',
- [files('tests/control_flow_tests.cpp'), nir_opcodes_h],
- c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
- include_directories : [inc_common],
- dependencies : [dep_thread, idep_gtest],
- link_with : [libmesa_util, libnir],
+ test(
+ 'nir_control_flow',
+ executable(
+ 'nir_control_flow_test',
+ files('tests/control_flow_tests.cpp'),
+ c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
+ include_directories : [inc_common],
+ dependencies : [dep_thread, idep_gtest, idep_nir],
+ link_with : libmesa_util,
+ )
)
-
- test('nir_control_flow', nir_control_flow_test)
endif