[vlc-devel] [PATCH 1/4] Add rustup to extras/tools

Rémi Denis-Courmont remi at remlab.net
Wed Jul 22 11:13:15 CEST 2020


Le tiistaina 21. heinäkuuta 2020, 22.05.18 EEST Kartik Ohri a écrit :
> On Tue, Jul 21, 2020 at 7:14 PM Rémi Denis-Courmont <remi at remlab.net> wrote:
> > Le tiistaina 21. heinäkuuta 2020, 12.34.05 EEST rustyc a écrit :
> > > From: rustyc <kartikohri13 at gmail.com>
> > > 
> > > ---
> > > 
> > >  extras/tools/SHA512SUMS   |  1 +
> > >  extras/tools/bootstrap    |  1 +
> > >  extras/tools/packages.mak |  3 +++
> > >  extras/tools/tools.mak    | 24 ++++++++++++++++++++++++
> > >  4 files changed, 29 insertions(+)
> > > 
> > > diff --git a/extras/tools/SHA512SUMS b/extras/tools/SHA512SUMS
> > > index f41238c45e..67c102d9e8 100644
> > > --- a/extras/tools/SHA512SUMS
> > > +++ b/extras/tools/SHA512SUMS
> > > @@ -20,3 +20,4 @@
> > 
> > d24849b93de58b20f518c071687e7bfa653a96600382f36c4cf7fc1047656458f75f093b91
> > 1
> > 
> > > b786b
> > 
> > 8d23dde18525dccaa648ca01df40151e7f00cec4846bd611c8970dbcfc1fb57a453facfe4d
> > 4
> > 
> > > 1462e7c3c8bb548d44b961a04e4fc3073ab6b65063e53f42bf6fd  nasm-2.14.tar.gz
> > 
> > e3c97ffd9409a543e45c8be7b12d4e8437de8dbd0cd236fbe092952d7d0833728d46ff6b67
> > 9
> > 
> > > c8a73dae4c4016fdf38b43b56f3959a95968a29db109ebfe254e7
> > 
> > meson-0.54.0.tar.gz
> > 
> > 1650bf9e3eddeb0b0fbb415c2b8e0a7c094421e991fa8139fd77fae0f6ee7ee980b7cf5e98
> > d
> > 
> > > 883c3a884f99abcb06fa26e3980af3a3a5bb6dd655124755782c2 
> > > ninja-1.8.2.tar.gz
> > 
> > +14a978a3cf699956722d8443070b9f8a043f1252cc1a7ed300b14637a0e6d654f34088d44
> > 0
> > 
> > > 3790c676500cbab327e30fdb7f81be0b9bde29e552143f26912ac7
> > 
> > rustup-1.22.1.tar.gz
> > 
> > > \ No newline at end of file
> > > diff --git a/extras/tools/bootstrap b/extras/tools/bootstrap
> > > index a22ddb1b4e..f47758a434 100755
> > > --- a/extras/tools/bootstrap
> > > +++ b/extras/tools/bootstrap
> > > @@ -148,6 +148,7 @@ check gettext
> > > 
> > >  check help2man
> > >  check meson 0.54.0
> > >  check ninja
> > > 
> > > +check rustup
> > > 
> > >  DEPS_ONLY="help2man"
> > > 
> > > diff --git a/extras/tools/packages.mak b/extras/tools/packages.mak
> > > index b151f7846f..e4ea1341a7 100644
> > > --- a/extras/tools/packages.mak
> > > +++ b/extras/tools/packages.mak
> > > @@ -65,3 +65,6 @@
> > > MESON_URL=
> > 
> > https://github.com/mesonbuild/meson/releases/download/$(MESON_VER
> > 
> > > SION)
> > > 
> > >  NINJA_VERSION=1.8.2
> > >  NINJA_URL=
> > 
> > https://github.com/ninja-build/ninja/archive/v$(NINJA_VERSION).ta
> > 
> > > r.gz +
> > > +RUSTUP_VERSION=1.22.1
> > > +RUSTUP_URL=
> > 
> > https://github.com/rust-lang/rustup/archive/$(RUSTUP_VERSION).ta
> > 
> > > r.gz \ No newline at end of file
> > > diff --git a/extras/tools/tools.mak b/extras/tools/tools.mak
> > > index db3a79c688..2191f70394 100644
> > > --- a/extras/tools/tools.mak
> > > +++ b/extras/tools/tools.mak
> > > @@ -439,6 +439,30 @@ CLEAN_PKG += ninja
> > > 
> > >  DISTCLEAN_PKG += ninja-$(NINJA_VERSION).tar.gz
> > >  CLEAN_FILE += .buildninja
> > > 
> > > +#
> > > +# rustup installation
> > > +#
> > > +
> > > +rustup-$(RUSTUP_VERSION).tar.gz:
> > > +     $(call download_pkg,$(RUSTUP_URL),rustup)
> > > +
> > > +rustup: rustup-$(RUSTUP_VERSION).tar.gz
> > > +     $(UNPACK)
> > > +     $(MOVE)
> > > +
> > > +.buildrustup: rustup
> > > +     cd $< && RUSTUP_HOME=$(PREFIX) CARGO_HOME=$(PREFIX) ./rustup-
> > 
> > init.sh
> > 
> > > --no-modify-path -y + rustup default stable
> > > +     rustup target add x86_64-pc-windows-gnu i686-pc-windows-gnu
> > > aarch64-linux-android\ +              arm-linux-androideabi i686-linux-
> > 
> > android
> > 
> > > x86_64-linux-android aarch64-apple-ios\ +             x86_64-
> > 
> > apple-ios
> > 
> > > x86_64-unknown-linux-gnu i686-unknown-linux-gnu +     cargo install
> > 
> > cargo-c
> > 
> > First, that looks like a rather arbitrary set of  targets.
> 
> I added the targets by looking at all the major systems supported by VLC.
> 
> > I think that
> > contribs is better armed to deal with cross-compilers if only because it
> > knows
> > what the target is. LuaC is already  there.
> > 
> > But in any case, the general opinion here seems to be that "real"
> > compilers
> > don't belong in the VLC build system at all. Hence the fact that C/C++
> > cross-
> > compilers are not there.
> 
> I understand. The case here is that rustup installs both the compiler
> toolchain and the cargo, the build tool which is used to build rust code.
> That's why I put it here.

I don't think that makes any difference.

On one hand, people could still use other build systems and tap directly into 
the toolchain. Indeed, VLC will most probably do exactly that if/when it 
supports Rust plug-ins.

And on the other hand, if the compiler is installed externally, then 
presumably so is cargo. As such there's really no point in adding cargo of its 
own in VLC tools.

-- 
Реми Дёни-Курмон
http://www.remlab.net/





More information about the vlc-devel mailing list