[vlc-commits] [Git][videolan/vlc][master] 9 commits: modules: Cargo.toml: expose vlcrs-core to modules

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Sep 2 09:37:01 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
164f5437 by Alexandre Janniaux at 2024-09-02T09:18:55+00:00
modules: Cargo.toml: expose vlcrs-core to modules

- - - - -
c8ce25a0 by Loïc at 2024-09-02T09:18:55+00:00
vlcrs: add autotools infra for build and linking Rust modules

The autotools suite (automake, libtool, ...) does not support Rust
neither Cargo (Rust package manager and build system) so we need to have
a custom system for using them. We do this by having "hacky" script that
does the build with cargo and output an .a archive in the .libs
directory. And with this and another cargo command we create the .la
with the right information so that the build system can continue as
usual.

- - - - -
19edba74 by Loïc at 2024-09-02T09:18:55+00:00
vlcrs: add meson infra for building and linking Rust modules

Despite meson officially "supporting" Rust it does support working with
Cargo (Rust package manager and build system) so we need to have
a bit of custom system for using it. `cargo-output.py` to build and copy
the output files (static archive and depfile) to the expected location
by meson. And `cargo-rustc-static-libs.py` to get the common linker args
for a bar-bone std rust program (ie without dependencies).

Those two scripts would potentially be removed if meson and/or cargo
became more flexible and/or intelligent.

- - - - -
3131cc19 by Vikram Kangotra at 2024-09-02T09:18:55+00:00
meson: rust: use enabled() instead of bool to check if rust is enabled

- - - - -
f3af3473 by Alexandre Janniaux at 2024-09-02T09:18:55+00:00
modules: Makefile.am: use absolute path for libtool script

The call to libtool_cargo will not depend on the current working
directory.

- - - - -
9b218aab by Alexandre Janniaux at 2024-09-02T09:18:55+00:00
libtool_cargo: rework argv handling

Avoid using array syntax from bash and use a case; esac to filter the
arguments given to the libtool_cargo wrapper. This allows to extract
some arguments, such as --cfg here.

- - - - -
ac1ae30b by Alexandre Janniaux at 2024-09-02T09:18:55+00:00
libtool_cargo: specify LIBTOOL path

Make the script work like Makefile.am files, by allowing to specify
where libtool is meant to be found. Using the same libtool as autoconf
will ensure we use the correct wrapper or alternative implementation as
specified by autoconf.

- - - - -
b57acd87 by Alexandre Janniaux at 2024-09-02T09:18:55+00:00
libtool_cargo: use printf instead of echo

`echo -n` on Darwin leads to `-n` being printed into the dependency
file. `printf` behaviour is more reliable so use it.

- - - - -
0361de5c by Alexandre Janniaux at 2024-09-02T09:18:55+00:00
modules: Makefile: forward static plugin configuration

Ensure that !HAVE_DYNAMIC_PLUGINS is correctly forwarded to Cargo so
that modules that are built statically are really built with the static
plugin API conventions, with suffixed `vlc_entry*` functions names.

This really enables and implement the static flavour for the Rust
plugins.

- - - - -


8 changed files:

- + buildsystem/cargo-output.py
- + buildsystem/cargo-rustc-static-libs.py
- meson.build
- meson_options.txt
- modules/Cargo.toml
- modules/Makefile.am
- + modules/libtool_cargo.sh
- modules/meson.build


Changes:

=====================================
buildsystem/cargo-output.py
=====================================
@@ -0,0 +1,80 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: LGPL-2.1-or-later
+# Copyright (C) 2022 Loïc Branstett <loic at videolabs.io>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+
+
+# This is a wrapper/interceptor script for Cargo (the Rust package manager) that adds
+# the ability to specify an output directory for the final compiler artifact
+# (archive lib, depfile).
+#
+# Usage: ./buildsystem/cargo-output.py --output=out/ --depfile NORMAL_CARGO_INVOCATION
+# Usage: ./buildsystem/cargo-output.py --output=out/ --depfile /usr/bin/cargo
+#          --target=x86_64-unknown-linux-gnu rustc --crate-type=staticlib
+#
+# The resulting static library will be put in the output directory as well as its depfile
+# if asked (--depfile) and available
+
+import os, sys, json, pathlib, shutil, subprocess, argparse
+
+def dir_path(string):
+    if os.path.isdir(string):
+        return string
+    else:
+        raise NotADirectoryError(string)
+
+parser = argparse.ArgumentParser()
+
+parser.add_argument("--depfile", action="store_true")
+parser.add_argument("-o", "--output", type=dir_path)
+parser.add_argument("cargo_cmds", nargs=argparse.REMAINDER)
+
+args = parser.parse_args()
+
+cargo_argv = args.cargo_cmds
+
+# Insert Cargo argument `--message-format=json-render-diagnostics`
+# before a `--` (if there are any) to still be in Cargo arguments
+# and not in the inner thing (rustc, ...)
+cargo_argv.insert(
+    cargo_argv.index('--') if '--' in cargo_argv else len(cargo_argv),
+    "--message-format=json-render-diagnostics"
+)
+
+# Execute the cargo build and redirect stdout (and not stderr)
+cargo_r = subprocess.run(cargo_argv, stdout=subprocess.PIPE)
+
+# We don't use `check=True` in the above `run` method call because it
+# raise an execption and outputing a python traceback isn't useful at all
+if cargo_r.returncode != 0:
+    sys.exit(cargo_r.returncode)
+
+# Get the jsons output
+cargo_stdout = cargo_r.stdout.decode('utf-8')
+cargo_jsons = [json.loads(line) for line in cargo_stdout.splitlines()]
+
+# We are only interrested in the final artifact (ie the output, not it's deps)
+last_compiler_artifact = next(
+        j for j in reversed(cargo_jsons) if j["reason"] == "compiler-artifact")
+
+# We only take the first one, because the other one are just aliases and thus
+# are not relevant for us
+first_compiler_artifact_filename = last_compiler_artifact["filenames"][0]
+
+for filename in [first_compiler_artifact_filename]:
+    shutil.copy2(filename, args.output)
+    if args.depfile:
+        shutil.copy2(pathlib.Path(filename).with_suffix(".d"), args.output)


=====================================
buildsystem/cargo-rustc-static-libs.py
=====================================
@@ -0,0 +1,83 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: LGPL-2.1-or-later
+# Copyright (C) 2022 Loïc Branstett <loic at videolabs.io>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+
+
+# This script is meant to find the required native libs of an empty Rust crate
+# compiled as a static lib.
+#
+# Usage: ./buildsystem/cargo-rustc-static-libs.py /usr/bin/cargo
+# Usage: ./buildsystem/cargo-rustc-static-libs.py /usr/bin/cargo --target=x86_64-unknown-linux-gnu
+#
+# The result is then printed to the standard output.
+
+import os, sys, json, subprocess, tempfile, argparse
+
+NATIVE_STATIC_LIBS="native-static-libs"
+
+parser = argparse.ArgumentParser()
+parser.add_argument("cargo_cmds", nargs=argparse.REMAINDER)
+
+args = parser.parse_args()
+
+cargo_argv = args.cargo_cmds
+cargo_argv.append("rustc")
+cargo_argv.append("--message-format=json")
+cargo_argv.append("--crate-type=staticlib")
+cargo_argv.append("--quiet")
+cargo_argv.append("--")
+cargo_argv.append("--print=native-static-libs")
+
+with tempfile.TemporaryDirectory() as tmpdir:
+    os.chdir(tmpdir)
+
+    with open("Cargo.toml", "w") as cargo_toml:
+        cargo_toml.write("""
+[package]
+name = "native-static-libs"
+version = "0.0.0"
+
+[lib]
+path = "lib.rs"
+""")
+    
+    with open("lib.rs", "w") as lib_rs:
+        lib_rs.write("#![allow(dead_code)] fn main(){}")
+
+    # Execute the cargo build and redirect stdout (and not stderr)
+    cargo_r = subprocess.run(cargo_argv, stdout=subprocess.PIPE)
+
+    # We don't use `check=True in run because it raise an execption
+    # and outputing a python traceback isn't useful at all.
+    #
+    # We also exit here so that the output o tmp dir is not cleared when
+    # there is an error.
+    if cargo_r.returncode != 0:
+        print("command: {cargo_argv}", file=sys.stderr)
+        print("cwd: {tmpdir}", file=sys.stderr)
+        sys.exit(cargo_r.returncode)
+
+# Get the jsons output
+cargo_stdout = cargo_r.stdout.decode('utf-8')
+cargo_jsons = [json.loads(line) for line in cargo_stdout.splitlines()]
+
+# Print the last message with a `NATIVE_STATIC_LIBS` message
+for j in reversed(cargo_jsons):
+    if j["reason"] == "compiler-message":
+        msg = j["message"]["message"]
+        if msg.startswith(NATIVE_STATIC_LIBS):
+            print(msg[len(NATIVE_STATIC_LIBS + ": "):])


=====================================
meson.build
=====================================
@@ -53,6 +53,9 @@ vlc_about = custom_target('vlc_about.h',
                                    '@INPUT2@',
                                    '@OUTPUT@'])
 
+cargo_rustc_static_libs = find_program('buildsystem/cargo-rustc-static-libs.py')
+cargo_output = find_program('buildsystem/cargo-output.py')
+
 add_project_arguments('-DHAVE_CONFIG_H=1', language: ['c', 'cpp', 'objc'])
 
 # If building with contribs, read the relevant paths from the machine file


=====================================
meson_options.txt
=====================================
@@ -70,6 +70,11 @@ option('extra_rust_flags',
     value : [],
     description : 'Extra RUSTFLAGS to be passed to the compiler when compiling Rust VLC modules')
 
+option('vendored_rust_deps',
+    type : 'string',
+    value : 'no',
+    description : 'Should use vendored sources: `no`, `yes` or PATH_TO_VENDORED_SOURCES')
+
 # TODO: Missing pdb option, this should probably be solved in meson itself
 
 # TODO: Missing ssp option


=====================================
modules/Cargo.toml
=====================================
@@ -3,6 +3,7 @@ resolver = "2"
 members = []
 
 [workspace.dependencies]
+vlcrs-core = { path = "../src/rust/vlcrs-core" }
 vlcrs-macros = { path = "../src/rust/vlcrs-macros" }
 vlcrs-messages = { path = "../src/rust/vlcrs-messages" }
 vlcrs-plugin = { path = "../src/rust/vlcrs-plugin" }


=====================================
modules/Makefile.am
=====================================
@@ -13,6 +13,37 @@ TESTS =
 dist_noinst_SCRIPTS = module.rc.in
 EXTRA_LTLIBRARIES =
 
+if HAVE_RUST
+
+LIBTOOL_CARGO_EXE = $(abs_srcdir)/libtool_cargo.sh
+
+CARGO_BUILD_ARGS = --target=@RUST_TARGET@ --release \
+	--crate-type=staticlib
+
+RUSTFLAGS = -C panic=abort -C opt-level=z
+if !HAVE_DYNAMIC_PLUGINS
+RUSTFLAGS += --cfg vlc_static_plugins
+endif
+
+LIBTOOL_CARGO = \
+	TARGET_CC=$(CC) TARGET_AR=$(AR) \
+	TARGET_CFLAGS="$(CFLAGS)" \
+	RUSTTARGET="@RUST_TARGET@" \
+	RUSTFLAGS="${RUSTFLAGS}" \
+	CARGO_TARGET_DIR="target-rust" \
+	LIBTOOL="$(LIBTOOL)" \
+	$(LIBTOOL_CARGO_EXE) $(CARGO) rustc $(CARGO_BUILD_ARGS)
+
+CARGO_PLUGINS_INV = ${LTLIBRARIES:%rs_plugin.la=%rs_plugin}
+CARGO_PLUGINS_CUT = ${CARGO_PLUGINS_INV:%.la=}
+CARGO_PLUGINS = ${CARGO_PLUGINS_CUT:%=%.la}
+
+CARGO_DEPS = ${CARGO_PLUGINS:%_plugin.la=${top_builddir}/modules/.libs/%.d}
+
+-include $(CARGO_DEPS)
+
+endif
+
 include common.am
 include access/Makefile.am
 include access/http/Makefile.am


=====================================
modules/libtool_cargo.sh
=====================================
@@ -0,0 +1,110 @@
+#!/bin/sh
+# SPDX-License-Identifier: LGPL-2.1-or-later
+# Copyright (C) 2022 Loïc Branstett <loic at videolabs.io>
+# Copyright (C) 2024 Alexandre Janniaux <ajanni at videolabs.io>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+
+
+# This script generate a libtool convinence library from a Cargo (Rust project)
+
+set -e # Automaticly exit on error
+
+: "${LIBTOOL:="../libtool"}"
+
+CFGS= 
+
+CARGO_RUSTC_CMD=
+while test $# -gt 2; do
+    case "$1" in
+        --cfg)
+            CFGS="${CFGS} --cfg $2"
+            shift; shift;
+            ;;
+        *)
+            CARGO_RUSTC_CMD="${CARGO_RUSTC_CMD} $1"
+            shift;
+            ;;
+    esac
+done
+
+if [ $# -lt 2 ]; then
+    echo "Invalid usage"
+    exit 1
+fi
+
+MODULE_PROJECT_DIR=$1
+LT_CONVENIENCE=$2
+
+# Build the project a first time without anything specitial)
+$CARGO_RUSTC_CMD --manifest-path="$MODULE_PROJECT_DIR/Cargo.toml" -- ${CFGS}
+
+# "Build" the project a second time and fetch the native-static-libs to link with
+NATIVE_STATIC_LIBS=$($CARGO_RUSTC_CMD --manifest-path="$MODULE_PROJECT_DIR/Cargo.toml" --quiet -- ${CFGS} --print native-static-libs 2>&1 | grep "native-static-libs" | sed "s/note: native-static-libs://" | sed "s/-lvlccore//")
+
+STATIC_LIB_NAME=$(echo $LT_CONVENIENCE | sed "s/\.la/\.a/")
+STATIC_LIB_DEP=$(echo $LT_CONVENIENCE | sed "s/\.la/\.d/")
+CARGO_STATIC_LIB_PATH="$CARGO_TARGET_DIR/$RUSTTARGET/release/$STATIC_LIB_NAME"
+CARGO_STATIC_DEP_PATH="$CARGO_TARGET_DIR/$RUSTTARGET/release/$STATIC_LIB_DEP"
+
+LT_VERSION=$(${LIBTOOL} --version | grep "libtool")
+
+cat <<EOF > $LT_CONVENIENCE
+# $LT_CONVENIENCE - a libtool library file
+# Generated by $LT_VERSION
+
+# The name that we can dlopen(3).
+dlname=''
+
+# Names of this library.
+library_names=''
+
+# The name of the static archive.
+old_library='$STATIC_LIB_NAME'
+
+# Linker flags that cannot go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' $NATIVE_STATIC_LIBS'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information
+current=0
+age=0
+revision=0
+
+# Is this an already installed library?
+installed=no
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir=''
+EOF
+
+mkdir -p "./.libs"
+ln -sf "../$LT_CONVENIENCE" "./.libs/$LT_CONVENIENCE"
+cp "$CARGO_STATIC_LIB_PATH" "./.libs/$STATIC_LIB_NAME"
+
+printf "%s" "$LT_CONVENIENCE:" > "./.libs/$STATIC_LIB_DEP"
+cat "$CARGO_STATIC_DEP_PATH" | cut -d ':' -f2 >> "./.libs/$STATIC_LIB_DEP"


=====================================
modules/meson.build
=====================================
@@ -199,9 +199,12 @@ rsvg_dep = dependency('librsvg-2.0', version: '>= 2.9.0', required: get_option('
 libgcrypt_dep = dependency('libgcrypt',
                             version: '>= 1.6.0',
                             required: get_option('libgcrypt'))
+# Rust support
+cargo_bin = find_program('cargo', required: get_option('rust'))
 
 # Array that holds all enabled VLC module dicts
 vlc_modules = []
+vlc_rust_modules = []
 
 # video chroma modules
 subdir('video_chroma')
@@ -376,3 +379,163 @@ foreach module : vlc_modules
         module['name']: module
     }
 endforeach
+
+# Rust/cargo common handling code
+if get_option('rust').enabled()
+    rust_optimization_args = {
+        'plain': [],
+        '0': [],
+        'g': ['-C', 'opt-level=0'],
+        '1': ['-C', 'opt-level=1'],
+        '2': ['-C', 'opt-level=2'],
+        '3': ['-C', 'opt-level=3'],
+        's': ['-C', 'opt-level=s'],
+    }
+    
+    print_static_libs_rustc = run_command([cargo_rustc_static_libs, cargo_bin],
+        check: true, capture: true)
+    rust_common_link_args = print_static_libs_rustc.stdout().split()
+
+    # Do not try to reorder those two operations, they may triger a bug in
+    # meson where array += element is not equal to array += array
+    rust_flags = get_option('extra_rust_flags')
+    rust_flags += rust_optimization_args[get_option('optimization')]
+    
+    cargo_target_dir = join_paths(meson.current_build_dir(), 'cargo_target')
+
+    extra_cargo_args = []
+    module_cargo_depends = []
+    if get_option('vendored_rust_deps') != 'no'
+        if get_option('vendored_rust_deps') == 'yes'
+            cargo_fetch_deps_tgt = custom_target('cargo_fetch_deps',
+                capture: false,
+                console: true,
+                build_by_default: true,
+                input: files('Cargo.lock'),
+                output: 'cargo_vendored_deps',
+                command: [cargo_bin, 'vendor', '--locked', '--versioned-dirs', '--manifest-path',
+                    files('Cargo.toml'), '@OUTPUT@'],
+            )
+            vendored_rust_deps_sources = cargo_fetch_deps_tgt.full_path()
+            module_cargo_depends = [cargo_fetch_deps_tgt]
+        else
+            vendored_rust_deps_sources = get_option('vendored_rust_deps')
+        endif
+
+        extra_cargo_args += ['--offline',
+            '--config', 'source.crates-io.replace-with="vendored-sources"',
+            '--config', f'source.vendored-sources.directory="@vendored_rust_deps_sources@"']
+    endif
+
+    vlcrs_core = custom_target('vlcrs_core-cargo',
+        capture: false,
+        console: true,
+        build_by_default: true,
+        input: files(
+            'vlcrs-core/Cargo.toml',
+            'vlcrs-core/src/error.rs',
+            'vlcrs-core/src/input_item.rs',
+            'vlcrs-core/src/lib.rs',
+            'vlcrs-core/src/messages.rs',
+            'vlcrs-core/src/module/args.rs',
+            'vlcrs-core/src/module/capi.rs',
+            'vlcrs-core/src/module.rs',
+            'vlcrs-core/src/object.rs',
+            'vlcrs-core/src/tick.rs',
+            'vlcrs-core/src/url.rs',
+            'vlcrs-core/sys/build.rs',
+            'vlcrs-core/sys/Cargo.toml',
+            'vlcrs-core/sys/src/lib.rs',
+            'vlcrs-core/sys/wrapper.h',
+        ),
+        output: 'libvlcrs_core.rlib',
+        depfile: 'libvlcrs_core.d',
+        depends: module_cargo_depends,
+        env: {
+          'RUSTFLAGS': rust_flags,
+          'CARGO_TARGET_DIR': cargo_target_dir
+        },
+        command: [cargo_output, '--output', '@OUTDIR@', '--depfile',
+            cargo_bin, 'build', '--locked', extra_cargo_args,
+            '--manifest-path', files('Cargo.toml'),
+            '-p', 'vlcrs-core']
+    )
+    vlcrs_core_macros = custom_target('vlcrs_core_macros-cargo',
+        capture: false,
+        console: true,
+        build_by_default: true,
+        input: files(
+            'vlcrs-core/macros/Cargo.toml',
+            'vlcrs-core/macros/src/lib.rs',
+            'vlcrs-core/macros/src/module.rs',
+        ),
+        depfile: 'libvlcrs_core_macros.d',
+        output: 'libvlcrs_core_macros.so',
+        depends: module_cargo_depends,
+        env: {
+          'RUSTFLAGS': rust_flags,
+          'CARGO_TARGET_DIR': cargo_target_dir
+        },
+        command: [cargo_output, '--output', '@OUTDIR@', '--depfile',
+            cargo_bin, 'build', '--locked', extra_cargo_args,
+            '--manifest-path', files('Cargo.toml'),
+            '-p', 'vlcrs-core-macros']
+    )
+
+    module_cargo_depends += [vlcrs_core, vlcrs_core_macros]
+
+    foreach module : vlc_rust_modules
+        if not module.has_key('name')
+            error('Got invalid vlc_rust_modules entry without \'name\' key')
+        endif
+        if not module.has_key('sources')
+            error('The vlc_rust_modules entry for ' + module['name'] + ' has no sources')
+        endif
+        if not module.has_key('cargo_toml')
+            error('The vlc_rust_modules entry for ' + module['name'] + ' has no cargo_toml')
+        endif
+
+        # This list MUST be kept in sync with the keys used below!
+        valid_dict_keys = [
+            'name',
+            'sources',
+            'cargo_toml',
+            'link_with',
+            'link_depends',
+            'dependencies',
+        ]
+        foreach key : module.keys()
+            if key not in valid_dict_keys
+                error('Invalid key \'@0@\' found in vlc_rust_modules entry for \'@1@\''
+                    .format(key, module['name']))
+            endif
+        endforeach
+
+        module_cargo = custom_target(module['name'] + '_cargo',
+            build_by_default: true,
+            input: module['cargo_toml'],
+            depends: module_cargo_depends,
+            depfile: 'lib' + module['name'] + '.d',
+            output: 'lib' + module['name'] + '.a',
+            env: {
+              'RUSTFLAGS': rust_flags,
+              'CARGO_TARGET_DIR': cargo_target_dir,
+            },
+            command: [cargo_output, '--output', '@OUTDIR@', '--depfile',
+                cargo_bin, 'rustc', '--quiet', '--color=always', '--crate-type=staticlib',
+                '--locked', extra_cargo_args, '--manifest-path', module['cargo_toml']]
+        )
+
+        library(module['name'] + '_plugin',
+            # FIXME(meson): `module_cargo` shouldn't be in `link_whole` because it prevents dead code
+            # elimination but meson doesn't yet have any way of setting the symbols to export and since
+            # `module_cargo` is an archive file everything is exported so nothing is really.
+            link_whole: module_cargo,
+            link_with: module.get('link_with', []),
+            link_args: [module.get('link_args', []), rust_common_link_args],
+            link_depends: module.get('link_depends', []),
+            dependencies: [module.get('dependencies', []), libvlccore_dep],
+            build_by_default: true,
+        )
+    endforeach
+endif



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1aa2d8047f4ca0d422b203c4f936241b76b1065a...0361de5cbea327c84591dffeae8e597f3f8c98c5

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1aa2d8047f4ca0d422b203c4f936241b76b1065a...0361de5cbea327c84591dffeae8e597f3f8c98c5
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list