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

Kartik Ohri kartikohri13 at gmail.com
Wed Jul 22 17:16:50 CEST 2020


On Wed, Jul 22, 2020 at 8:03 PM Rémi Denis-Courmont <remi at remlab.net> wrote:

> Le tiistaina 21. heinäkuuta 2020, 21.40.21 EEST Martin Storsjö a écrit :
> > On Tue, 21 Jul 2020, 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
> >
> > This is incorrectly assuming that windows implies x86. HAVE_WIN* only
> > implies the bitness, but it can still be armv7 and aarch64 in addition to
> > i686 and x86_64.
>
> Not even that. HAVE_WIN32 implies that the Win32 API is available, which
> requires pointers of 32 bits *or more*.
>
> And HAVE_WIN64 is not even defined in VLC contribs.
>
> I have fixed the bitness issue in the newer patch I sent for this. In that
patch, I have assumed that HAVE_WIN32 implies the target is Windows (as
Cmake and Meson do the same) and dropped the use of HAVE_WIN64.

But it seems that HAVE_WIN64 is defined in contribs around line 41 in
contrib/src/main.mak.

ifeq ($(ARCH)-$(HAVE_WIN32),x86_64-1)
HAVE_WIN64 := 1
endif
ifeq ($(ARCH)-$(HAVE_WIN32),aarch64-1)
HAVE_WIN64 := 1
endif

-- 
> 雷米‧德尼-库尔蒙
> 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/396bc6c4/attachment-0001.html>


More information about the vlc-devel mailing list