Skip to contentSkip to conversation

meson: build a full dependency for lib_igt_perf

PATCH New Daniel Vetter 2 participants 6 messages Nov 29, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson: build a full dependency for lib_igt_perf

meson prefers packages dependencies over passing arount static libraries, because those also include linker flags, include dirs and everything else.

While at it pull the special cases out from the common build stanzas like we do with other special cases.

Just a bit of ocd to keep everything polished.

---
 benchmarks/meson.build |  9 +++------
 lib/meson.build        |  5 ++++-
 overlay/meson.build    |  4 ++--
 tests/meson.build      | 11 +++++------
 4 files changed, 14 insertions(+), 15 deletions(-)
benchmarks/meson.build +3 -6
index fa7f07643a97..4afd204f82b2 100644
@@ -12,7 +12,6 @@ benchmark_progs = [
 	'gem_prw',
 	'gem_set_domain',
 	'gem_syslatency',
-	'gem_wsim',
 	'kms_vblank',
 	'prime_lookup',
 	'vgem_mmap',
@@ -31,11 +30,9 @@ endif
 foreach prog : benchmark_progs
 	# FIXME meson doesn't like binaries with the same name
 	# meanwhile just suffix with _bench
-	link = []
-	if prog == 'gem_wsim'
-		link += lib_igt_perf
-	endif
 	executable(prog + '_bench', prog + '.c',
-		   link_with : link,
 		   dependencies : test_deps)
 endforeach
+
+executable('gem_wsim_bench', 'gem_wsim.c',
+	   dependencies : test_deps + [ lib_igt_perf ])
lib/meson.build +4 -1
index 29d89cf09b58..d06d85b438b2 100644
@@ -180,8 +180,11 @@ lib_igt = declare_dependency(link_with : lib_igt_build,
 
 igt_deps = [ lib_igt ] + lib_deps
 
-lib_igt_perf = static_library('igt_perf',
+lib_igt_perf_build = static_library('igt_perf',
 	['igt_perf.c']
 )
 
+lib_igt_perf = declare_dependency(link_with : lib_igt_perf_build,
+				  include_directories : inc)
+
 subdir('tests')
overlay/meson.build +2 -2
index 6b479eb89890..afacff5ecf60 100644
@@ -21,7 +21,8 @@ dri2proto = dependency('dri2proto', version : '>= 2.6', required : false)
 cairo_xlib = dependency('cairo-xlib', required : false)
 xrandr = dependency('xrandr', version : '>=1.3', required : false)
 
-gpu_overlay_deps = [ realtime, math, cairo, pciaccess, libdrm, libdrm_intel ]
+gpu_overlay_deps = [ realtime, math, cairo, pciaccess, libdrm,
+	libdrm_intel, lib_igt_perf ]
 
 both_x11_src = ''
 
@@ -55,6 +56,5 @@ if xrandr.found() and cairo.found()
 			include_directories : inc,
 			c_args : gpu_overlay_cflags,
 			dependencies : gpu_overlay_deps,
-			link_with : lib_igt_perf,
 			install : true)
 endif
tests/meson.build +5 -6
index 088c37ec9b15..58fe0b0557a3 100644
@@ -193,7 +193,6 @@ test_progs = [
 	'kms_vblank',
 	'meta_test',
 	'perf',
-	'perf_pmu',
 	'pm_backlight',
 	'pm_lpsp',
 	'pm_rc6_residency',
@@ -263,17 +262,17 @@ libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'), 'intel-g
 test_executables = []
 
 foreach prog : test_progs
-	link = []
-	if prog == 'perf_pmu'
-		link += lib_igt_perf
-	endif
 	test_executables += executable(prog, prog + '.c',
 		   dependencies : test_deps,
 		   install_dir : libexecdir,
-		   link_with : link,
 		   install : true)
 endforeach
 
+test_executables += executable('perf_pmu', 'perf_pmu.c',
+	   dependencies : test_deps + [ lib_igt_perf ],
+	   install_dir : libexecdir,
+	   install : true)
+
 executable('testdisplay', ['testdisplay.c', 'testdisplay_hotplug.c'],
 	   dependencies : test_deps,
 	   install_dir : libexecdir,
Signature · 6 lines
2.15.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✗ Fi.CI.BAT: failure for meson: build a full dependency for lib_igt_perf

== Series Details ==

== Series Details ==

Series: meson: build a full dependency for lib_igt_perf
URL : https://patchwork.freedesktop.org/series/34618/
State : failure

== Summary ==

Series 34618 revision 1 was fully merged or fully failed: no git log

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✗ Fi.CI.BAT: failure for meson: build a full dependency for lib_igt_perf

In reply to Daniel Vetter
== Series Details ==

== Series Details ==

Series: meson: build a full dependency for lib_igt_perf
URL : https://patchwork.freedesktop.org/series/34618/
State : failure

== Summary ==

Series 34618 revision 1 was fully merged or fully failed: no git log

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

✗ Fi.CI.BAT: failure for meson: build a full dependency for lib_igt_perf

In reply to Daniel Vetter
== Series Details ==

== Series Details ==

Series: meson: build a full dependency for lib_igt_perf
URL : https://patchwork.freedesktop.org/series/34618/
State : failure

== Summary ==

Applying: meson: build a full dependency for lib_igt_perf Patch failed at 0001 meson: build a full dependency for lib_igt_perf The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

✗ Fi.CI.BAT: failure for meson: build a full dependency for lib_igt_perf

In reply to Daniel Vetter
== Series Details ==

== Series Details ==

Series: meson: build a full dependency for lib_igt_perf
URL : https://patchwork.freedesktop.org/series/34618/
State : failure

== Summary ==

Applying: meson: build a full dependency for lib_igt_perf Patch failed at 0001 meson: build a full dependency for lib_igt_perf The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

✗ Fi.CI.BAT: failure for meson: build a full dependency for lib_igt_perf

In reply to Daniel Vetter
== Series Details ==

== Series Details ==

Series: meson: build a full dependency for lib_igt_perf
URL : https://patchwork.freedesktop.org/series/34618/
State : failure

== Summary ==

Applying: meson: build a full dependency for lib_igt_perf Patch failed at 0001 meson: build a full dependency for lib_igt_perf The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx