Re: [PATCH spice-common 2/2] meson: Do not build generated files twice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> spice-gtk and spice-server will use spice_common_client_dep
> and spice_common_server_dep as dependencies.
> However they will depend on both spice-common client/server
> libraries and their sources causing the sources to be compiled
> multiple times and causes linker errors on spice-gtk.
> The issue can be observed doing a "find -name \*generated\*.o"
> in Meson build directory.
> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  common/meson.build | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/common/meson.build b/common/meson.build
> index fdee5ec..895521a 100644
> --- a/common/meson.build
> +++ b/common/meson.build
> @@ -107,8 +107,7 @@ if spice_common_generate_client_code
>                                             install : false,
>                                             dependencies : spice_common_dep)
>  
> -  spice_common_client_dep = declare_dependency(sources : target,
> -                                               link_with :
> spice_common_client_lib,
> +  spice_common_client_dep = declare_dependency(link_with :
> spice_common_client_lib,
>                                                 dependencies :
>                                                 spice_common_dep)
>  endif
>  
> @@ -161,7 +160,6 @@ if spice_common_generate_server_code
>                                             install : false,
>                                             dependencies : spice_common_dep)
>  
> -  spice_common_server_dep = declare_dependency(sources : target,
> -                                               link_with :
> spice_common_server_lib,
> +  spice_common_server_dep = declare_dependency(link_with :
> spice_common_server_lib,
>                                                 dependencies :
>                                                 spice_common_dep)
>  endif

Even this patch is wrong. We need sources with headers for the dependency
but not with C modules to avoid compiling multiple times.

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]