]> git.lizzy.rs Git - rust.git/commit
auto merge of #13584 : rcxdude/rust/cross-syntax-ext, r=alexcrichton
authorbors <bors@rust-lang.org>
Wed, 23 Apr 2014 20:11:37 +0000 (13:11 -0700)
committerbors <bors@rust-lang.org>
Wed, 23 Apr 2014 20:11:37 +0000 (13:11 -0700)
commit07aef98a3262b69f0a4b20c9677d63f2f2f50f27
tree14eedde61809d48fc9e7d7f467aeb8e1940792c6
parent6beb376b5c27c6b028092f227f865ba564fea17b
parent4ac89cd27613ffe574a6fc6009793c1900e5cfca
auto merge of #13584 : rcxdude/rust/cross-syntax-ext, r=alexcrichton

This allows the use of syntax extensions when cross-compiling (fixing #12102). It does this by encoding the target triple in the crate metadata and checking it when searching for files. Currently the crate triple must match the host triple when there is a macro_registrar_fn, it must match the target triple when linking, and can match either when only macro_rules! macros are used.

due to carelessness, this is pretty much a duplicate of https://github.com/mozilla/rust/pull/13450.
src/librustc/metadata/common.rs
src/librustc/metadata/decoder.rs
src/librustc/metadata/encoder.rs
src/librustc/metadata/filesearch.rs