about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-12-31 12:37:17 -0800
committerbors <bors@rust-lang.org>2013-12-31 12:37:17 -0800
commit8ec03b37c05203026c02336639428146f1c4360e (patch)
tree62569d7154f52965abbee4426cf816712e88e785 /src/rustllvm/RustWrapper.cpp
parent5ff7b283731b795930d1e6782ae1639c83595e91 (diff)
parentcbe8c61fed3ccff0a34a9ff79105ad5b7a7de5b3 (diff)
downloadrust-8ec03b37c05203026c02336639428146f1c4360e.tar.gz
rust-8ec03b37c05203026c02336639428146f1c4360e.zip
auto merge of #11155 : SiegeLord/rust/early_deps, r=pcwalton
The `--dep-info` command line option allows a nice way to generate make-style dependencies, but it currently does so alongside building of the output binary. This isn't a problem for make, as it mixes dependency graph generation and actual building, but it is problematic for other tools (e.g. CMake) which keep them separate.

To play more nicely with those tools, I've moved the --dep-info output from phase 6 (linking) up to after phase 2 (expansion of macros). Also, since there was no prior option to do so, I added a command line switch (`--no-analysis`) to stop compilation just before phase 3 (type-checking) which speeds this up even further.

Here's the beginning of a CMake function which is enabled by this change:

~~~cmake
function(get_rust_deps root_file out_var)
	execute_process(COMMAND rustc ${RUSTC_FLAGS} --no-analysis --dep-info "${CMAKE_BINARY_DIR}/.deps" "${root_file}")
	
	# Read and parse the dependency information
	file(READ "${CMAKE_BINARY_DIR}/.deps" crate_deps)
	file(REMOVE "${CMAKE_BINARY_DIR}/.deps")
	# parsing follows...
~~~
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions