mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
82c6f5d7a7
Our current build system support for Rust compiles any Rust crate into a so-called staticlib, which is a static library (.a file) that includes the Rust runtime. That staticlib is then linked into libxul. For supporting multiple crates, this approach breaks down, as linking multiple copies of the Rust runtime is going to fail. For supporting multiple crates, the approach taken here is to compile each crate into a so-called rlib, which is essentially a staticlib without the Rust runtime linked in. The build system takes note of every crate destined for linking with libxul (treating them like static libraries generated from C/C++ files), and generates a super-crate, whimsically named "rul", that is compiled as a staticlib (so as to include the Rust runtime) and then linked into libxul. Thus only one copy of the Rust runtime is included, and the Rust compiler can take care of any inter-crate dependencies. This patch currently only supports Rust code in shared libraries, not in binaries. |
||
---|---|---|
.. | ||
external | ||
faster | ||
makefiles | ||
Moz | ||
tests | ||
android-common.mk | ||
autoconf-js.mk.in | ||
autoconf.mk.in | ||
baseconfig.mk | ||
check_macroassembler_style.py | ||
check_source_count.py | ||
check_spidermonkey_style.py | ||
check_utils.py | ||
check_vanilla_allocations.py | ||
config.mk | ||
createprecomplete.py | ||
doxygen.cfg.in | ||
emptyvars-js.mk.in | ||
emptyvars.mk.in | ||
expandlibs_config.py | ||
expandlibs_exec.py | ||
expandlibs_gen.py | ||
expandlibs.py | ||
find_OOM_errors.py | ||
gcc_hidden.h | ||
gcc-stl-wrapper.template.h | ||
install.bat | ||
link.py | ||
make-stl-wrappers.py | ||
Makefile.in | ||
milestone.txt | ||
moz.build | ||
mozunit.py | ||
MozZipFile.py | ||
msvc-stl-wrapper.template.h | ||
nsinstall.c | ||
nsinstall.py | ||
pathsub.c | ||
pathsub.h | ||
printconfigsetting.py | ||
printprereleasesuffix.py | ||
pythonpath.py | ||
rebuild_check.py | ||
recurse.mk | ||
rules.mk | ||
static-checking-config.mk | ||
stl-headers | ||
string-format.js | ||
system-headers | ||
version_win.pl | ||
version.mk |