[vlc-devel] [PATCH 2/4] Add cross-compilation targets for Rust contribs
Steve Lhomme
robux4 at ycbcr.xyz
Tue Jul 21 13:07:51 CEST 2020
Aren't a lot of the the usual triplet we already use ?
In that case it would be better to use the triplet by default and only
set the values that differ from it.
Alternatively you could disable building RUST contribs if RUST_TARGET is
not set.
On 2020-07-21 11:34, rustyc wrote:
> ---
> contrib/src/main.mak | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/contrib/src/main.mak b/contrib/src/main.mak
> index 3119a39875..c8d7df4202 100644
> --- a/contrib/src/main.mak
> +++ b/contrib/src/main.mak
> @@ -440,6 +440,36 @@ else
> MESON = meson $(MESONFLAGS)
> endif
>
> +ifdef HAVE_WIN32
> +RUST_TARGET = i686-pc-windows-gnu
> +else ifdef HAVE_WIN64
> +RUST_TARGET = x86_64-pc-windows-gnu
> +else ifdef HAVE_BSD
> +RUST_TARGET = x86_64-unknown-freebsd
> +else ifdef HAVE_ANDROID
> +ifeq ($(PLATFORM_SHORT_ARCH), arm64)
> +RUST_TARGET = aarch64-linux-android
> +else ifeq ($(PLATFORM_SHORT_ARCH), arm)
> +RUST_TARGET = arm-linux-androideabi
> +else ifeq ($(PLATFORM_SHORT_ARCH), x86)
> +RUST_TARGET = i686-linux-android
> +else ifeq ($(PLATFORM_SHORT_ARCH), x86_64)
> +RUST_TARGET = x86_64-linux-android
> +endif
> +else ifdef HAVE_IOS
> +ifeq ($(PLATFORM_SHORT_ARCH), arm64)
> +RUST_TARGET = aarch64-apple-ios
> +else ifeq ($(PLATFORM_SHORT_ARCH), x86_64)
> +RUST_TARGET = x86_64-apple-ios
> +endif
> +else ifdef HAVE_MACOSX
> +RUST_TARGET = x86_64-apple-darwin
> +else ifdef HAVE_SOLARIS
> +RUST_TARGET = x86_64-sun-solaris
> +else ifdef HAVE_LINUX
> +RUST_TARGET = x86_64-unknown-linux-gnu
> +endif
> +
> ifdef GPL
> REQUIRE_GPL =
> else
> --
> 2.25.1
>
> _______________________________________________
> 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