From patchwork Wed Nov 29 13:06:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10082113 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 92E1C60234 for ; Wed, 29 Nov 2017 13:06:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AB1E29775 for ; Wed, 29 Nov 2017 13:06:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79B8729809; Wed, 29 Nov 2017 13:06:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D909E2980E for ; Wed, 29 Nov 2017 13:06:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BDE5F6E8DF; Wed, 29 Nov 2017 13:06:52 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 38EA26E8DF for ; Wed, 29 Nov 2017 13:06:52 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id l141so6137461wmg.1 for ; Wed, 29 Nov 2017 05:06:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id; bh=GuAKWGu+G8xPdKitDI8RKgNcO0CHN4Tcb42fC/gTdoo=; b=EEcfdDjZDvouphSZgDL4I++S5ROd18WsW2yqHGGq+I/ju1KyyBSHA0q4TAnLFBHBl6 TRL8j7QuYtx4pcIFgbFpmfGAGf4aMXtoX0sghuQz11bBqCKDvv2NoUjf6X5IvkeBLbut /6E+3aOqvyKJ7t5Nee06rx4wjv0GbajRSxuNU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=GuAKWGu+G8xPdKitDI8RKgNcO0CHN4Tcb42fC/gTdoo=; b=m56hcE1A00fg2rHJFm6YjqCZjFK0xEtsz2iDsOT6Q0OExYk7xtdEZm+MGE2g4ctI44 QQHXX+LZbjnAGkKfuY3krba3lcSZe/bk9degoY/fODc4pzUkioXSNv/bwyzj8ddh+b+2 nAtTi1vVnje9kiwvI4ad6gM22hJ4r8xb6FIG5mbIJ7WZts0TrYr0Z8JzaUoASFCZrwW2 n3oJEqMnngZlY4B8zP0JSKusgeeiYAkSVcDXL5aroXNXNA9azh1eqQhLNe982APTdmas XuXdRm9uOsAF3aYlUeWrQprp72mIRej4qv2Z4Iljxlz3UOc13GQrogifMKjYhfHF8krF f2uQ== X-Gm-Message-State: AJaThX5W4zrYahj0xYBHWE6HLWq8j1o8bkWc1AGureC7hRvB7EH4bNHJ w+s4VM7yUsizyOfNcsiFhlnTeA0O X-Google-Smtp-Source: AGs4zMbaCdHaQDwkI3crlbKu+uGPCoAFwBZiMsYAuv6JgHCu7SC3b6LgYVdZmIlH+4IrBgBtMKtnkA== X-Received: by 10.80.164.87 with SMTP id v23mr7439625edb.99.1511960810485; Wed, 29 Nov 2017 05:06:50 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:5635:0:39d2:f87e:2033:9f6]) by smtp.gmail.com with ESMTPSA id t23sm1583836edb.70.2017.11.29.05.06.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Nov 2017 05:06:49 -0800 (PST) From: Daniel Vetter To: Intel Graphics Development Date: Wed, 29 Nov 2017 14:06:44 +0100 Message-Id: <20171129130644.10293-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.15.0 Cc: Daniel Vetter , Daniel Vetter Subject: [Intel-gfx] [PATCH i-g-t] meson: build a full dependency for lib_igt_perf X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP 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. Cc: Tvrtko Ursulin Signed-off-by: Daniel Vetter --- benchmarks/meson.build | 9 +++------ lib/meson.build | 5 ++++- overlay/meson.build | 4 ++-- tests/meson.build | 11 +++++------ 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/benchmarks/meson.build b/benchmarks/meson.build index fa7f07643a97..4afd204f82b2 100644 --- a/benchmarks/meson.build +++ b/benchmarks/meson.build @@ -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 ]) diff --git a/lib/meson.build b/lib/meson.build index 29d89cf09b58..d06d85b438b2 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -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') diff --git a/overlay/meson.build b/overlay/meson.build index 6b479eb89890..afacff5ecf60 100644 --- a/overlay/meson.build +++ b/overlay/meson.build @@ -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 diff --git a/tests/meson.build b/tests/meson.build index 088c37ec9b15..58fe0b0557a3 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -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,