summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/meson.build3
-rw-r--r--src/compiler/meson.build4
-rw-r--r--src/compiler/nir/meson.build18
3 files changed, 19 insertions, 6 deletions
diff --git a/src/compiler/glsl/meson.build b/src/compiler/glsl/meson.build
index 2a6bddf4a84..b0c0de810a6 100644
--- a/src/compiler/glsl/meson.build
+++ b/src/compiler/glsl/meson.build
@@ -205,8 +205,9 @@ libglsl = static_library(
ir_expression_operation_strings_h, ir_expression_operation_constant_h],
c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
- link_with : [libnir, libglcpp],
+ link_with : libglcpp,
include_directories : [inc_common, inc_compiler, inc_nir],
+ dependencies : idep_nir,
build_by_default : false,
)
diff --git a/src/compiler/meson.build b/src/compiler/meson.build
index 783be11c926..d86bdde61d8 100644
--- a/src/compiler/meson.build
+++ b/src/compiler/meson.build
@@ -58,9 +58,9 @@ subdir('nir')
spirv2nir = executable(
'spirv2nir',
[files('spirv/spirv2nir.c'), dummy_cpp],
- dependencies : [dep_m, dep_thread],
+ dependencies : [dep_m, dep_thread, idep_nir],
include_directories : [inc_common, inc_nir, include_directories('spirv')],
- link_with : [libnir, libmesa_util],
+ link_with : libmesa_util,
c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
build_by_default : false,
)
diff --git a/src/compiler/nir/meson.build b/src/compiler/nir/meson.build
index 54cef67e9e0..b5f27ad667b 100644
--- a/src/compiler/nir/meson.build
+++ b/src/compiler/nir/meson.build
@@ -205,6 +205,18 @@ libnir = static_library(
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
@@ -212,11 +224,11 @@ if with_tests
'nir_control_flow',
executable(
'nir_control_flow_test',
- [files('tests/control_flow_tests.cpp'), nir_opcodes_h],
+ 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],
- link_with : [libmesa_util, libnir],
+ dependencies : [dep_thread, idep_gtest, idep_nir],
+ link_with : libmesa_util,
)
)
endif