mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-14 15:37:55 +00:00
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 |
||
---|---|---|
.. | ||
dumbmake | ||
mozbuild | ||
mozpack | ||
setup.py | ||
TODO |