зеркало из https://github.com/mozilla/gecko-dev.git
2ea918802d
Add .rs as a recognized file extension in SOURCES. Propagate that through to the Makefile backend and add a dependency generated and an explicit rule to call $(RUSTC) to compile them. rustc builds static libraries, not obj files. At least, if one asks it to output an obj file, I'm not clear how to get all the compiler-specific runtime libraries the code will expect to link to. Therefore we generate a static library for each rust source file (which must be a complete crate for the time being) and link that. Because of the extension it ends up on the LIBS line in the the corresponding .desc file. Note that the static library does still depend on some system libraries, e.g. -ldl -lpthread -lm on linux. Gecko already links to all of those, so we don't keep track of it here. Should we need to add explicit linkage for other targets, rustc does print a list to stderr which can be parsed. --HG-- extra : rebase_source : 9f66101fd15a649a952d5481cf9561416204272a |
||
---|---|---|
.. | ||
Moz | ||
external | ||
makefiles | ||
tests | ||
Makefile.in | ||
MozZipFile.py | ||
android-common.mk | ||
autoconf-js.mk.in | ||
autoconf.mk.in | ||
baseconfig.mk | ||
check_source_count.py | ||
check_spidermonkey_style.py | ||
check_vanilla_allocations.py | ||
config.mk | ||
configobj.py | ||
createprecomplete.py | ||
doxygen.cfg.in | ||
emptyvars-js.mk.in | ||
emptyvars.mk.in | ||
expandlibs.py | ||
expandlibs_config.py | ||
expandlibs_exec.py | ||
expandlibs_gen.py | ||
find_OOM_errors.py | ||
gcc-stl-wrapper.template.h | ||
gcc_hidden.h | ||
gcc_hidden_dso_handle.h | ||
glibcversion.sh | ||
install.bat | ||
link.py | ||
make-stl-wrappers.py | ||
milestone.txt | ||
moz.build | ||
mozunit.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 | ||
solaris_ia32.map | ||
static-checking-config.mk | ||
static-checking.js | ||
stl-headers | ||
string-format.js | ||
system-headers | ||
version.mk | ||
version_win.pl |