[PATCH 7/8] gitlab: disable optimization and debug symbols in msys build

Daniel P. Berrangé posted 8 patches 2 years, 6 months ago
Maintainers: Yonggang Luo <luoyonggang@gmail.com>, "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
[PATCH 7/8] gitlab: disable optimization and debug symbols in msys build
Posted by Daniel P. Berrangé 2 years, 6 months ago
Building at -O2, adds 33% to the build time, over -O2. IOW a build that
takes 45 minutes at -O0, takes 60 minutes at -O2. Turning off debug
symbols drops it further, down to 38 minutes.

IOW, a "-O2 -g" build is 58% slower than a "-O0" build on msys in the
gitlab CI windows shared runners.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 .gitlab-ci.d/windows.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.d/windows.yml b/.gitlab-ci.d/windows.yml
index 34109a80f2..552e3b751d 100644
--- a/.gitlab-ci.d/windows.yml
+++ b/.gitlab-ci.d/windows.yml
@@ -113,7 +113,7 @@ msys2-64bit:
     # commit 9f8e6cad65a6 ("gitlab-ci: Speed up the msys2-64bit job by using --without-default-devices"
     # changed to compile QEMU with the --without-default-devices switch
     # for the msys2 64-bit job, due to the build could not complete within
-    CONFIGURE_ARGS:  --target-list=x86_64-softmmu --without-default-devices
+    CONFIGURE_ARGS:  --target-list=x86_64-softmmu --without-default-devices -Ddebug=false -Doptimization=0
     # qTests don't run successfully with "--without-default-devices",
     # so let's exclude the qtests from CI for now.
     TEST_ARGS: --no-suite qtest
@@ -123,5 +123,5 @@ msys2-32bit:
   variables:
     MINGW_TARGET: mingw-w64-i686
     MSYSTEM: MINGW32
-    CONFIGURE_ARGS:  --target-list=ppc64-softmmu
+    CONFIGURE_ARGS:  --target-list=ppc64-softmmu -Ddebug=false -Doptimization=0
     TEST_ARGS: --no-suite qtest
-- 
2.41.0


Re: [PATCH 7/8] gitlab: disable optimization and debug symbols in msys build
Posted by Thomas Huth 2 years, 6 months ago
On 01/08/2023 15.04, Daniel P. Berrangé wrote:
> Building at -O2, adds 33% to the build time, over -O2. IOW a build that
> takes 45 minutes at -O0, takes 60 minutes at -O2. Turning off debug
> symbols drops it further, down to 38 minutes.
> 
> IOW, a "-O2 -g" build is 58% slower than a "-O0" build on msys in the
> gitlab CI windows shared runners.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>   .gitlab-ci.d/windows.yml | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/.gitlab-ci.d/windows.yml b/.gitlab-ci.d/windows.yml
> index 34109a80f2..552e3b751d 100644
> --- a/.gitlab-ci.d/windows.yml
> +++ b/.gitlab-ci.d/windows.yml
> @@ -113,7 +113,7 @@ msys2-64bit:
>       # commit 9f8e6cad65a6 ("gitlab-ci: Speed up the msys2-64bit job by using --without-default-devices"
>       # changed to compile QEMU with the --without-default-devices switch
>       # for the msys2 64-bit job, due to the build could not complete within
> -    CONFIGURE_ARGS:  --target-list=x86_64-softmmu --without-default-devices
> +    CONFIGURE_ARGS:  --target-list=x86_64-softmmu --without-default-devices -Ddebug=false -Doptimization=0
>       # qTests don't run successfully with "--without-default-devices",
>       # so let's exclude the qtests from CI for now.
>       TEST_ARGS: --no-suite qtest
> @@ -123,5 +123,5 @@ msys2-32bit:
>     variables:
>       MINGW_TARGET: mingw-w64-i686
>       MSYSTEM: MINGW32
> -    CONFIGURE_ARGS:  --target-list=ppc64-softmmu
> +    CONFIGURE_ARGS:  --target-list=ppc64-softmmu -Ddebug=false -Doptimization=0
>       TEST_ARGS: --no-suite qtest

This is IMHO a very good idea! But I think for now it's enough if you only 
change the 64-bit, isn't it?

  Thomas


Re: [PATCH 7/8] gitlab: disable optimization and debug symbols in msys build
Posted by Daniel P. Berrangé 2 years, 6 months ago
On Tue, Aug 01, 2023 at 08:44:02PM +0200, Thomas Huth wrote:
> On 01/08/2023 15.04, Daniel P. Berrangé wrote:
> > Building at -O2, adds 33% to the build time, over -O2. IOW a build that
> > takes 45 minutes at -O0, takes 60 minutes at -O2. Turning off debug
> > symbols drops it further, down to 38 minutes.
> > 
> > IOW, a "-O2 -g" build is 58% slower than a "-O0" build on msys in the
> > gitlab CI windows shared runners.
> > 
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> >   .gitlab-ci.d/windows.yml | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/.gitlab-ci.d/windows.yml b/.gitlab-ci.d/windows.yml
> > index 34109a80f2..552e3b751d 100644
> > --- a/.gitlab-ci.d/windows.yml
> > +++ b/.gitlab-ci.d/windows.yml
> > @@ -113,7 +113,7 @@ msys2-64bit:
> >       # commit 9f8e6cad65a6 ("gitlab-ci: Speed up the msys2-64bit job by using --without-default-devices"
> >       # changed to compile QEMU with the --without-default-devices switch
> >       # for the msys2 64-bit job, due to the build could not complete within
> > -    CONFIGURE_ARGS:  --target-list=x86_64-softmmu --without-default-devices
> > +    CONFIGURE_ARGS:  --target-list=x86_64-softmmu --without-default-devices -Ddebug=false -Doptimization=0
> >       # qTests don't run successfully with "--without-default-devices",
> >       # so let's exclude the qtests from CI for now.
> >       TEST_ARGS: --no-suite qtest
> > @@ -123,5 +123,5 @@ msys2-32bit:
> >     variables:
> >       MINGW_TARGET: mingw-w64-i686
> >       MSYSTEM: MINGW32
> > -    CONFIGURE_ARGS:  --target-list=ppc64-softmmu
> > +    CONFIGURE_ARGS:  --target-list=ppc64-softmmu -Ddebug=false -Doptimization=0
> >       TEST_ARGS: --no-suite qtest
> 
> This is IMHO a very good idea! But I think for now it's enough if you only
> change the 64-bit, isn't it?

My thought was if we do it for 32-bit too, we can enable some more targets
to get a more comprehensive build.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|