[vlc-devel] [PATCHv4 05/12] contrib: add cargo

Martin Storsjö martin at martin.st
Fri Sep 11 11:56:09 CEST 2020


On Fri, 11 Sep 2020, Thomas Guillem wrote:

>
>
> On Fri, Sep 11, 2020, at 08:40, Martin Storsjö wrote:
>> On Tue, 8 Sep 2020, Thomas Guillem wrote:
>> 
>> > From: Kartik Ohri <kartikohri13 at gmail.com>
>> >
>> > This will install rustup, cargo, and cargo-c into contrib/bin/.cargo
>> > This installation will be used by default for all rust contrib builds.
>> >
>> > The correct cargo target will be automatically installed when needed.
>> > ---
>> > contrib/src/cargo/SHA512SUMS |  1 +
>> > contrib/src/cargo/rules.mak  | 28 ++++++++++++++++++++++++++++
>> > 2 files changed, 29 insertions(+)
>> > create mode 100644 contrib/src/cargo/SHA512SUMS
>> > create mode 100644 contrib/src/cargo/rules.mak
>> 
>> For more exotic targets, this fails like this:
>> 
>> error: toolchain 'stable-x86_64-unknown-linux-gnu' does not contain 
>> component 'rust-std' for target 'aarch64-pc-windows-gnu'
>> ../src/cargo/rules.mak:31: recipe for target '.cargo' failed
>> make: *** [.cargo] Error 1
>> 
>> 
>> Can these contrib components (rust/cargo and rav1e) skipped for 
>> armv7/aarch64-windows?
>
> There is a aarch64-pc-windows-msvc target. Can it be used?

Hmm, maybe it could (most of the differences between msvc and gnu/mingw 
should be handled just fine as long as linking with lld, as long as it 
doesn't expect you to have bits only defined in static libraries only 
shipped with MSVC). However in practice it seems to fail:

error: .seh_ directive must appear within an active frame

error: could not compile `libc`.

Caused by:
   process didn't exit successfully: `rustc --crate-name libc [... snip 
...]` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
LLVM ERROR: Failed to evaluate function length in SEH unwind info
error: could not compile `itertools`.


> And indeed, we can skip targets. If RUST_TARGET is not defined, Rust contribs won't be built.
>
> cf. the IOS case:
>
> else ifdef HAVE_IOS
> ifneq ($(ARCH),arm) # iOS 32bit is Tier 3
> ifndef HAVE_TVOS # tvOS is Tier 3
> RUST_TARGET = $(ARCH)-apple-ios
> endif
> endif
>
> We skip ios-arm et aarch64-tvos here.

Ah, I see. I'll add relevant conditions to the win32 case here then.

// Martin


More information about the vlc-devel mailing list