]>
Commit | Line | Data |
---|---|---|
1a4d82fc JJ |
1 | // Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT |
2 | // file at the top-level directory of this distribution and at | |
3 | // http://rust-lang.org/COPYRIGHT. | |
4 | // | |
5 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | |
6 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
7 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | |
8 | // option. This file may not be copied, modified, or distributed | |
9 | // except according to those terms. | |
10 | ||
11 | //! The Rust compiler. | |
12 | //! | |
13 | //! # Note | |
14 | //! | |
15 | //! This API is completely unstable and subject to change. | |
16 | ||
17 | #![crate_name = "rustc_trans"] | |
e9174d1e | 18 | #![unstable(feature = "rustc_private", issue = "27812")] |
1a4d82fc JJ |
19 | #![crate_type = "dylib"] |
20 | #![crate_type = "rlib"] | |
e9174d1e | 21 | #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", |
62682a34 | 22 | html_favicon_url = "https://doc.rust-lang.org/favicon.ico", |
e9174d1e | 23 | html_root_url = "https://doc.rust-lang.org/nightly/")] |
7453a54e | 24 | #![cfg_attr(not(stage0), deny(warnings))] |
1a4d82fc | 25 | |
85aaf69f | 26 | #![feature(box_patterns)] |
1a4d82fc | 27 | #![feature(box_syntax)] |
62682a34 | 28 | #![feature(const_fn)] |
b039eaaf SL |
29 | #![feature(custom_attribute)] |
30 | #![allow(unused_attributes)] | |
62682a34 | 31 | #![feature(iter_arith)] |
85aaf69f | 32 | #![feature(libc)] |
85aaf69f | 33 | #![feature(quote)] |
1a4d82fc | 34 | #![feature(rustc_diagnostic_macros)] |
85aaf69f | 35 | #![feature(rustc_private)] |
92a42be0 | 36 | #![feature(slice_patterns)] |
85aaf69f | 37 | #![feature(staged_api)] |
85aaf69f | 38 | #![feature(unicode)] |
54a0048b | 39 | #![feature(question_mark)] |
c34b1796 | 40 | |
1a4d82fc JJ |
41 | extern crate arena; |
42 | extern crate flate; | |
43 | extern crate getopts; | |
44 | extern crate graphviz; | |
45 | extern crate libc; | |
54a0048b | 46 | #[macro_use] extern crate rustc; |
1a4d82fc | 47 | extern crate rustc_back; |
92a42be0 | 48 | extern crate rustc_data_structures; |
54a0048b | 49 | extern crate rustc_incremental; |
7453a54e | 50 | pub extern crate rustc_llvm as llvm; |
92a42be0 | 51 | extern crate rustc_mir; |
e9174d1e | 52 | extern crate rustc_platform_intrinsics as intrinsics; |
c1a9b12d | 53 | extern crate serialize; |
54a0048b SL |
54 | extern crate rustc_const_math; |
55 | extern crate rustc_const_eval; | |
1a4d82fc JJ |
56 | |
57 | #[macro_use] extern crate log; | |
58 | #[macro_use] extern crate syntax; | |
59 | ||
60 | pub use rustc::session; | |
1a4d82fc JJ |
61 | pub use rustc::middle; |
62 | pub use rustc::lint; | |
1a4d82fc JJ |
63 | pub use rustc::util; |
64 | ||
54a0048b SL |
65 | pub use base::trans_crate; |
66 | pub use disr::Disr; | |
67 | ||
1a4d82fc | 68 | pub mod back { |
1a4d82fc | 69 | pub use rustc_back::rpath; |
54a0048b | 70 | pub use rustc::hir::svh; |
1a4d82fc | 71 | |
c1a9b12d | 72 | pub mod archive; |
62682a34 | 73 | pub mod linker; |
1a4d82fc JJ |
74 | pub mod link; |
75 | pub mod lto; | |
54a0048b | 76 | pub mod symbol_names; |
1a4d82fc | 77 | pub mod write; |
c1a9b12d | 78 | pub mod msvc; |
1a4d82fc JJ |
79 | } |
80 | ||
b039eaaf SL |
81 | pub mod diagnostics; |
82 | ||
54a0048b SL |
83 | #[macro_use] |
84 | mod macros; | |
85 | ||
86 | mod abi; | |
87 | mod adt; | |
88 | mod asm; | |
89 | mod attributes; | |
90 | mod base; | |
91 | mod basic_block; | |
92 | mod build; | |
93 | mod builder; | |
94 | mod cabi_aarch64; | |
95 | mod cabi_arm; | |
96 | mod cabi_asmjs; | |
97 | mod cabi_mips; | |
98 | mod cabi_powerpc; | |
99 | mod cabi_powerpc64; | |
100 | mod cabi_x86; | |
101 | mod cabi_x86_64; | |
102 | mod cabi_x86_win64; | |
103 | mod callee; | |
104 | mod cleanup; | |
105 | mod closure; | |
106 | mod common; | |
107 | mod consts; | |
108 | mod context; | |
109 | mod controlflow; | |
110 | mod datum; | |
111 | mod debuginfo; | |
112 | mod declare; | |
113 | mod disr; | |
114 | mod expr; | |
115 | mod glue; | |
116 | mod inline; | |
117 | mod intrinsic; | |
118 | mod machine; | |
119 | mod _match; | |
120 | mod meth; | |
121 | mod mir; | |
122 | mod monomorphize; | |
123 | mod collector; | |
124 | mod symbol_names_test; | |
125 | mod tvec; | |
126 | mod type_; | |
127 | mod type_of; | |
128 | mod value; | |
129 | ||
130 | #[derive(Copy, Clone)] | |
131 | pub struct ModuleTranslation { | |
132 | pub llcx: llvm::ContextRef, | |
133 | pub llmod: llvm::ModuleRef, | |
134 | } | |
135 | ||
136 | unsafe impl Send for ModuleTranslation { } | |
137 | unsafe impl Sync for ModuleTranslation { } | |
1a4d82fc | 138 | |
54a0048b SL |
139 | pub struct CrateTranslation { |
140 | pub modules: Vec<ModuleTranslation>, | |
141 | pub metadata_module: ModuleTranslation, | |
142 | pub link: middle::cstore::LinkMeta, | |
143 | pub metadata: Vec<u8>, | |
144 | pub reachable: Vec<String>, | |
145 | pub no_builtins: bool, | |
1a4d82fc | 146 | } |
92a42be0 SL |
147 | |
148 | __build_diagnostic_array! { librustc_trans, DIAGNOSTICS } |