[PATCH] tests/meson: Only build softfloat objects if TCG is selected

Philippe Mathieu-Daudé posted 1 patch 3 years, 1 month ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210322114739.4078408-1-f4bug@amsat.org
tests/meson.build | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
[PATCH] tests/meson: Only build softfloat objects if TCG is selected
Posted by Philippe Mathieu-Daudé 3 years, 1 month ago
The previous attempt (commit f77147cd4de) doesn't work as
expected, as we still have CONFIG_TCG=1 when using:

  configure --disable-system --disable-user

Use Meson's get_option() instead to remove the softfloat tests
when building with --disable-tcg.

Suggested-by: Claudio Fontana <cfontana@suse.de>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Alex Bennée <alex.bennee@linaro.org>
Cc: Emilio G. Cota <cota@braap.org>
---
 tests/meson.build | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tests/meson.build b/tests/meson.build
index 55a7b082751..250fbc99a36 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -76,11 +76,8 @@
      workdir: meson.current_source_dir() / 'decode',
      suite: 'decodetree')
 
-if 'CONFIG_TCG' in config_all
-  subdir('fp')
-endif
-
 if not get_option('tcg').disabled()
+  subdir('fp')
   if 'CONFIG_PLUGIN' in config_host
     subdir('plugin')
   endif
-- 
2.26.2

Re: [PATCH] tests/meson: Only build softfloat objects if TCG is selected
Posted by Paolo Bonzini 3 years, 1 month ago
On 22/03/21 12:47, Philippe Mathieu-Daudé wrote:
> The previous attempt (commit f77147cd4de) doesn't work as
> expected, as we still have CONFIG_TCG=1 when using:
> 
>    configure --disable-system --disable-user

But there's no change in behavior with this patch, right?

I would rather first start removing CONFIG_TCG from target-dependent 
files (such as tests/qtest/bios-tables-test.c and 
tests/qtest/qmp-cmd-test.c), and then just remove the

   config_host += { 'CONFIG_TCG': 'y' }

line that is not needed anymore.

Paolo


Re: [PATCH] tests/meson: Only build softfloat objects if TCG is selected
Posted by Philippe Mathieu-Daudé 3 years, 1 month ago
On 3/22/21 1:57 PM, Paolo Bonzini wrote:
> On 22/03/21 12:47, Philippe Mathieu-Daudé wrote:
>> The previous attempt (commit f77147cd4de) doesn't work as
>> expected, as we still have CONFIG_TCG=1 when using:
>>
>>    configure --disable-system --disable-user
> 
> But there's no change in behavior with this patch, right?

I'm trying to save CI minutes from the build-tools-and-docs-debian
job which uses:

configure --disable-system --disable-user --disable-tools --enable-docs

See https://gitlab.com/qemu-project/qemu/-/jobs/1117005759:

[77/1268] Compiling C object
libqemuutil.a.p/meson-generated_.._trace_trace-qapi.c.o
[645/1268] Compiling C object
tests/fp/libtestfloat.a.p/berkeley-testfloat-3_source_writeCase_a_f32.c.o
[1079/1268] Compiling C object
tests/unit/test-clone-visitor.p/test-clone-visitor.c.o
[1132/1268] Compiling C object tests/unit/test-qdist.p/test-qdist.c.o

> 
> I would rather first start removing CONFIG_TCG from target-dependent
> files (such as tests/qtest/bios-tables-test.c and
> tests/qtest/qmp-cmd-test.c), and then just remove the
> 
>   config_host += { 'CONFIG_TCG': 'y' }
> 
> line that is not needed anymore.

You seems right, I missed something, I'll revisit...

Thanks.

Re: [PATCH] tests/meson: Only build softfloat objects if TCG is selected
Posted by Philippe Mathieu-Daudé 3 years, 1 month ago
On 3/22/21 2:09 PM, Philippe Mathieu-Daudé wrote:
> On 3/22/21 1:57 PM, Paolo Bonzini wrote:
>> On 22/03/21 12:47, Philippe Mathieu-Daudé wrote:

>> I would rather first start removing CONFIG_TCG from target-dependent
>> files (such as tests/qtest/bios-tables-test.c and
>> tests/qtest/qmp-cmd-test.c), and then just remove the
>>
>>   config_host += { 'CONFIG_TCG': 'y' }
>>
>> line that is not needed anymore.

This looks the correct thing to do but not something I'm
willing to do now, so please simply disregard this patch.

Regards,

Phil.

Re: [PATCH] tests/meson: Only build softfloat objects if TCG is selected
Posted by Alex Bennée 3 years, 1 month ago
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> The previous attempt (commit f77147cd4de) doesn't work as
> expected, as we still have CONFIG_TCG=1 when using:
>
>   configure --disable-system --disable-user
>
> Use Meson's get_option() instead to remove the softfloat tests
> when building with --disable-tcg.
>
> Suggested-by: Claudio Fontana <cfontana@suse.de>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée