summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2017-09-27 15:15:33 -0700
committerDylan Baker <dylan@pnwbakers.com>2017-09-27 15:17:49 -0700
commit854bd7eaea05cdae5f0863de386fb37c53278727 (patch)
tree1e41ecc119d05e40ce77cca0164dcc95627c93fb
parent3e3772c1b3727c67da1cec503e7afb37e3786f53 (diff)
downloadmesa-wip/meson-use-43-features.tar.gz
meson: bump meson version requirements to 0.43wip/meson-use-43-features
There are two features that have made it into 0.43 that make the meson build system much nicer to work with. One involves picking the C++ linker when linking with a static library that was linked with a static library containing C++ code instead of the C linker; the other is the ability to index into CustomTarget's to only include some of their sources. This allows us to not just delete code, but also to remove a dependency on touch, and delete code. For the CustomTarget indexing it also makes the build system more robust, since the workaround used would not work if the generated source was not in the same directory as the consumer. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
-rw-r--r--meson.build10
-rw-r--r--src/compiler/meson.build2
-rw-r--r--src/intel/vulkan/meson.build17
3 files changed, 6 insertions, 23 deletions
diff --git a/meson.build b/meson.build
index 5353a417484..e4058f5f8ff 100644
--- a/meson.build
+++ b/meson.build
@@ -19,7 +19,7 @@
# SOFTWARE.
project('mesa', ['c', 'cpp'], version : '17.3.0-devel', license : 'MIT',
- default_options : ['c_std=c99'])
+ default_options : ['c_std=c99'], meson_version : '>= 0.43.0')
with_dri3 = true # XXX: need a switch for this
with_vulkan_icd_dir = get_option('vulkan_icd_dir')
@@ -427,14 +427,6 @@ endif
# TODO: gallium driver dirs
-# FIXME: this is a workaround for #2326
-prog_touch = find_program('touch')
-dummy_cpp = custom_target(
- 'dummy_cpp',
- output : 'dummy.cpp',
- command : [prog_touch, '@OUTPUT@'],
-)
-
foreach a : pre_args
add_project_arguments(a, language : ['c', 'cpp'])
endforeach
diff --git a/src/compiler/meson.build b/src/compiler/meson.build
index 9a40e2e3a1a..4d6a3d4c4ca 100644
--- a/src/compiler/meson.build
+++ b/src/compiler/meson.build
@@ -48,7 +48,7 @@ subdir('nir')
spirv2nir = executable(
'spirv2nir',
- [files('spirv/spirv2nir.c'), dummy_cpp],
+ files('spirv/spirv2nir.c'),
dependencies : [dep_m, dep_thread],
include_directories : [inc_common, inc_nir, include_directories('spirv')],
link_with : [libnir, libmesa_util],
diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/meson.build
index 9f0ee558e8a..561432d3c93 100644
--- a/src/intel/vulkan/meson.build
+++ b/src/intel/vulkan/meson.build
@@ -48,15 +48,6 @@ intel_icd = custom_target(
install : true,
)
-# TODO: workaround for anv_entrypoints combining the .h and .c files in it's
-# output. See issue #2346
-block_entrypoints = custom_target(
- 'block_entrypoints',
- command : [prog_touch, '@OUTPUT@'],
- output : 'null',
- depends : anv_entrypoints,
-)
-
libanv_gen_libs = []
anv_gen_files = files(
'genX_blorp_exec.c',
@@ -73,7 +64,7 @@ foreach g : [['70', ['gen7_cmd_buffer.c']], ['75', ['gen7_cmd_buffer.c']],
_files = g[1]
_lib = static_library(
'libanv_gen@0@'.format(_gen),
- [anv_gen_files, _files, block_entrypoints, nir_opcodes_h],
+ [anv_gen_files, _files, anv_entrypoints[0], nir_opcodes_h],
include_directories : [inc_common, inc_compiler, inc_drm_uapi, inc_intel,
inc_vulkan_util, inc_vulkan_wsi],
c_args : [c_vis_args, no_override_init_args, '-msse2',
@@ -140,7 +131,7 @@ libanv_common = static_library(
libvulkan_intel = shared_library(
'vulkan_intel',
- [files('anv_gem.c'), block_entrypoints],
+ [files('anv_gem.c'), anv_entrypoints[0]],
include_directories : [inc_common, inc_intel, inc_compiler, inc_drm_uapi,
inc_vulkan_util, inc_vulkan_wsi],
link_whole : [libanv_common, libanv_gen_libs],
@@ -155,7 +146,7 @@ libvulkan_intel = shared_library(
if with_tests
libvulkan_intel_test = static_library(
'vulkan_intel_test',
- [files('anv_gem_stubs.c'), block_entrypoints],
+ [files('anv_gem_stubs.c'), anv_entrypoints[0]],
include_directories : [inc_common, inc_intel, inc_compiler, inc_drm_uapi,
inc_vulkan_util, inc_vulkan_wsi],
link_whole : libanv_common,
@@ -171,7 +162,7 @@ if with_tests
'state_pool_free_list_only', 'state_pool']
_exe = executable(
t,
- ['tests/@0@.c'.format(t), dummy_cpp, block_entrypoints],
+ ['tests/@0@.c'.format(t), anv_entrypoints[0]],
link_with : libvulkan_intel_test,
dependencies : [dep_libdrm, dep_thread, dep_m, dep_valgrind],
include_directories : [inc_common, inc_intel, inc_compiler,