[vlc-devel] [PATCH] contrib: rust: remove lto

Thomas Guillem thomas at gllm.fr
Thu Jan 7 13:31:49 UTC 2021


LGTM

On Thu, Jan 7, 2021, at 13:52, Alexandre Janniaux wrote:
> rustc is not able to use -C lto for staticlibs. The correct way would be
> to use -Clinker-plugin-lto and compile the C code with -flto=thin.
> ---
>  contrib/src/main-rust.mak | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/contrib/src/main-rust.mak b/contrib/src/main-rust.mak
> index 104656ea3c..af877f3954 100644
> --- a/contrib/src/main-rust.mak
> +++ b/contrib/src/main-rust.mak
> @@ -62,7 +62,7 @@ CARGO_INSTALL = $(CARGO) install $(CARGO_INSTALL_ARGS)
>  
>  CARGOC_INSTALL = export TARGET_CC=$(CC) && export TARGET_AR=$(AR) && \
>  	export TARGET_CFLAGS="$(CFLAGS)" && \
> -	export RUSTFLAGS="-C lto -C panic=abort -C opt-level=z" && \
> +	export RUSTFLAGS="-C panic=abort -C opt-level=z" && \
>  	$(CARGO) capi install $(CARGO_INSTALL_ARGS)
>  
>  download_vendor = \
> -- 
> 2.30.0
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list