gecko-dev/python/mozbuild
Ralph Giles 2ea918802d Bug 1161339 - Add rust support to moz.build. r=ted
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
2015-05-08 15:18:00 -07:00
..
dumbmake Bug 869613 - Make mach build some/deeper/path do dependencies for some and 2013-09-27 14:47:37 -04:00
mozbuild Bug 1161339 - Add rust support to moz.build. r=ted 2015-05-08 15:18:00 -07:00
mozpack Bug 1153790 - mac unification doesn't work with packaged addons. r=glandium 2015-04-27 00:46:20 +02:00
TODO
setup.py