summaryrefslogtreecommitdiff
path: root/src/options.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/options.rs')
-rw-r--r--src/options.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/options.rs b/src/options.rs
index 657c3c9a..8beac469 100644
--- a/src/options.rs
+++ b/src/options.rs
@@ -338,6 +338,13 @@ where
.takes_value(true)
.multiple(true)
.number_of_values(1),
+ Arg::with_name("module-raw-line")
+ .long("module-raw-line")
+ .help("Add a raw line of Rust code to a given module.")
+ .takes_value(true)
+ .multiple(true)
+ .number_of_values(2)
+ .value_names(&["module-name", "raw-line"]),
Arg::with_name("rust-target")
.long("rust-target")
.help(&rust_target_help)
@@ -769,6 +776,13 @@ where
}
}
+ if let Some(mut values) = matches.values_of("module-raw-line") {
+ while let Some(module) = values.next() {
+ let line = values.next().unwrap();
+ builder = builder.module_raw_line(module, line);
+ }
+ }
+
if matches.is_present("use-core") {
builder = builder.use_core();
}