diff options
author | Dylan Baker <[email protected]> | 2017-12-12 12:22:56 -0800 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2018-01-11 15:40:02 -0800 |
commit | 2083a14179eb04d22feebc5751a1a145828d07cf (patch) | |
tree | 0fa3d2d540621d00faa6daf0c132aa5127f2dab0 /src/mesa | |
parent | 60856a7b4982aaaa4f22a002878d5d78cd63e272 (diff) |
meson: Use dependencies for nir
This creates two new internal dependencies, idep_nir_headers and
idep_nir. The former encapsulates the generation of nir_opcodes.h and
nir_builder_opcodes.h and adding src/compiler/nir as an include path.
This ensures that any target that needs nir headers will have the
includes and that the generated headers will be generated before the
target is build. The second, idep_nir, includes the first and
additionally links to libnir.
This is intended to make it easier to avoid race conditions in the build
when using nir, since the number of consumers for libnir and it's
headers are quite high.
Acked-by: Eric Engestrom <[email protected]>
Signed-off-by: Dylan Baker <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/meson.build | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/meson.build | 4 | ||||
-rw-r--r-- | src/mesa/meson.build | 3 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/meson.build b/src/mesa/drivers/dri/i965/meson.build index 1183978b7b3..9adda06183d 100644 --- a/src/mesa/drivers/dri/i965/meson.build +++ b/src/mesa/drivers/dri/i965/meson.build @@ -138,13 +138,13 @@ i965_gen_libs = [] foreach v : ['40', '45', '50', '60', '70', '75', '80', '90', '100'] i965_gen_libs += static_library( 'libi965_gen@0@'.format(v), - ['genX_blorp_exec.c', 'genX_state_upload.c', nir_opcodes_h, gen_xml_pack], + ['genX_blorp_exec.c', 'genX_state_upload.c', gen_xml_pack], include_directories : [inc_common, inc_intel, inc_dri_common], c_args : [ c_vis_args, no_override_init_args, '-msse2', '-DGEN_VERSIONx10=@0@'.format(v), ], - dependencies : [dep_libdrm], + dependencies : [dep_libdrm, idep_nir_headers], ) endforeach @@ -166,17 +166,17 @@ endforeach libi965 = static_library( 'i965', - [files_i965, i965_oa_sources, nir_opcodes_h, ir_expression_operation_h, + [files_i965, i965_oa_sources, ir_expression_operation_h, xmlpool_options_h], include_directories : [ - inc_common, inc_intel, inc_dri_common, inc_util, inc_drm_uapi, inc_nir, + inc_common, inc_intel, inc_dri_common, inc_util, inc_drm_uapi, ], c_args : [c_vis_args, no_override_init_args, '-msse2'], cpp_args : [cpp_vis_args, '-msse2'], link_with : [ i965_gen_libs, libintel_common, libisl, libintel_compiler, libblorp, ], - dependencies : [dep_libdrm, dep_valgrind], + dependencies : [dep_libdrm, dep_valgrind, idep_nir_headers], ) dri_drivers += libi965 diff --git a/src/mesa/drivers/dri/meson.build b/src/mesa/drivers/dri/meson.build index e73ee39381e..94798b0f5da 100644 --- a/src/mesa/drivers/dri/meson.build +++ b/src/mesa/drivers/dri/meson.build @@ -48,10 +48,10 @@ if dri_drivers != [] link_whole : dri_drivers, link_with : [ libmegadriver_stub, libdricommon, libxmlconfig, libglapi, libmesa_util, - libnir, libmesa_classic, + libmesa_classic, ], dependencies : [ - dep_selinux, dep_libdrm, dep_expat, dep_m, dep_thread, dep_dl, + dep_selinux, dep_libdrm, dep_expat, dep_m, dep_thread, dep_dl, idep_nir, ], link_args : ['-Wl,--build-id=sha1', ld_args_bsymbolic, ld_args_gc_sections], ) diff --git a/src/mesa/meson.build b/src/mesa/meson.build index ab6bc273129..998953d6411 100644 --- a/src/mesa/meson.build +++ b/src/mesa/meson.build @@ -687,7 +687,6 @@ files_libmesa_common += [ main_marshal_generated_h, main_dispatch_h, ir_expression_operation_h, - nir_opcodes_h, main_remap_helper_h, matypes_h, sha1_h, @@ -711,6 +710,7 @@ libmesa_classic = static_library( cpp_args : [cpp_vis_args, cpp_msvc_compat_args], include_directories : [inc_common, include_directories('main')], link_with : [libglsl, libmesa_sse41], + dependencies : idep_nir_headers, build_by_default : false, ) @@ -721,6 +721,7 @@ libmesa_gallium = static_library( cpp_args : [cpp_vis_args, cpp_msvc_compat_args], include_directories : [inc_common, include_directories('main')], link_with : [libglsl, libmesa_sse41], + dependencies : idep_nir_headers, build_by_default : false, ) |