[vlc-devel] [PATCH 2/4] Add cross-compilation targets for Rust contribs

Kartik Ohri kartikohri13 at gmail.com
Tue Jul 21 21:16:08 CEST 2020


On Tue, Jul 21, 2020 at 7:17 PM Rémi Denis-Courmont <remi at remlab.net> wrote:

> Le tiistaina 21. heinäkuuta 2020, 12.34.06 EEST rustyc a écrit :
> > ---
> >  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
>
> No matter how you look at this, it's wrong. What Steve said. Also BSD is a
> necessary but not sufficient condition for FreeBSD.
>
> I'll fix the issues that have been pointed to make this correct. Regarding
BSD, I agree it was sloppy. I'll add checks for the different BSDs.

> I doubt that, but if you really need complex logic, like get-arch.sh.
>
> > +
> >  ifdef GPL
> >  REQUIRE_GPL =
> >  else
>
>
> --
> Реми Дёни-Курмон
> http://www.remlab.net/
>
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200722/c28df118/attachment.html>


More information about the vlc-devel mailing list