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

Kartik Ohri kartikohri13 at gmail.com
Tue Jul 21 21:22:05 CEST 2020


I checked and found that the Android triplets are the same and I'll use
them directly for setting RUSTUP_TARGET. The triplets differ in the case of
iOS though. Taking Remi's suggestion, I'll move these checks to a shell
script instead.

On Tue, Jul 21, 2020 at 5:59 PM Kartik Ohri <kartikohri13 at gmail.com> wrote:

> On Tue, Jul 21, 2020 at 4:38 PM Steve Lhomme <robux4 at ycbcr.xyz> wrote:
>
>> Aren't a lot of the the usual triplet we already use ?
>>
>> I need to check for Android and iOS but for Windows and Linux those are
> different. For macOS, the docs (https://wiki.videolan.org/MacOSCompile/)
> say that triple is like x86_64-apple-darwin15 so if some user specifies a
> version suffixed triple for macOS the Rust target will be incorrect again.
>
>> 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
>> >
>> _______________________________________________
>> 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/03e07cfc/attachment.html>


More information about the vlc-devel mailing list