Skip to content

Commit 904ae6b

Browse files
librust-pnacl-trans: Add an option to treat all inputs as raw.
1 parent 2ed444c commit 904ae6b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/librust-pnacl-trans/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ fn optgroups() -> Vec<OptGroup> {
6565
optopt("", "target", "The target triple to codegen for", ""),
6666
reqopt("", "cross-path", "The path to the Pepper SDK", ""),
6767
optmulti("", "raw", "The specified bitcodes have had none of the usual PNaCl IR \
68-
legalization passes run on them", ""))
68+
legalization passes run on them", ""),
69+
optflag("", "all-raw", "All input bitcodes are of raw form"))
6970

7071
}
7172
fn fatal<T: Str + Show>(msg: T) -> ! {
@@ -139,10 +140,10 @@ pub fn main() {
139140
};
140141
let cross_path = matches.opt_str("cross-path").unwrap();
141142
let cross_path = os::make_absolute(&Path::new(cross_path));
142-
143+
let all_raw = matches.opt_present("all-raw");
143144
let mut input: Vec<(String, bool)> = matches.free
144145
.iter()
145-
.map(|i| (i.clone(), false) )
146+
.map(|i| (i.clone(), all_raw) )
146147
.collect();
147148

148149
let output = matches.opt_str("o").unwrap();

0 commit comments

Comments
 (0)