DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev <dev@dpdk.org>, Bruce Richardson <bruce.richardson@intel.com>
Subject: Re: [dpdk-dev] [PATCH] devtools: reduce examples in static builds
Date: Sun, 19 Apr 2020 09:08:04 +0200	[thread overview]
Message-ID: <CAJFAV8wfVYS0PZD11=OpbnCODxLXBHjqnMOyvD1HAoigx+GWaw@mail.gmail.com> (raw)
In-Reply-To: <20200418131942.1388633-1-thomas@monjalon.net>

On Sat, Apr 18, 2020 at 3:20 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> Static builds can take a lot of space, so reduce the number of examples
> built when testing those static builds.
>
> As makefile-based build is close to end of life, completely skip examples
> in case of static linkage with make.
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  devtools/test-build.sh        | 1 +
>  devtools/test-meson-builds.sh | 7 ++++++-
>  2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/devtools/test-build.sh b/devtools/test-build.sh
> index e6e40588c6..a298115002 100755
> --- a/devtools/test-build.sh
> +++ b/devtools/test-build.sh
> @@ -257,6 +257,7 @@ for conf in $configs ; do
>         echo "================== Build examples for $conf"
>         export RTE_SDK=$(readlink -f $dir)/install/share/dpdk
>         ln -sTf $(pwd)/lib $RTE_SDK/lib # workaround for vm_power_manager
> +       grep -q 'SHARED_LIB=n' $dir/.config || # skip examples with static libs
>         ${MAKE} -j$J -sC examples \
>                 EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose \
>                 O=$(readlink -f $dir)/examples
> diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
> index c1ff2bb50a..b1c0380809 100755
> --- a/devtools/test-meson-builds.sh
> +++ b/devtools/test-meson-builds.sh
> @@ -74,7 +74,12 @@ config () # <dir> <builddir> <meson options>
>                 return
>         fi
>         options=
> -       options="$options --werror -Dexamples=all"
> +       options="$options --werror"
> +       if echo $* | grep -qw -- '--default-library=static' ; then
> +               options="$options -Dexamples=l3fwd"
> +       else
> +               options="$options -Dexamples=all"
> +       fi

Ok, this is hypothetical, but this would not work when no
default-library option is passed (static is the default value).
How about inverting the check and look for default-library=shared ?

Besides, you won't catch already configured directories.
While for make environments, this change will have an effect right away.


-- 
David Marchand


  reply	other threads:[~2020-04-19  7:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-18 13:19 Thomas Monjalon
2020-04-19  7:08 ` David Marchand [this message]
2020-04-19 14:29   ` Thomas Monjalon
2020-04-19 14:40     ` Thomas Monjalon
2020-04-21  0:30 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
2020-04-21  6:59   ` David Marchand
2020-04-21  9:18     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJFAV8wfVYS0PZD11=OpbnCODxLXBHjqnMOyvD1HAoigx+GWaw@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).