Skip to content
This repository was archived by the owner on Mar 24, 2022. It is now read-only.

Commit b698b09

Browse files
committed
actually pass argument from command line to compiler
1 parent 238b259 commit b698b09

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

lucetc/lucetc/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ pub fn run(opts: &Options) -> Result<(), Error> {
141141
c.count_instructions(true);
142142
}
143143

144+
if opts.pinned_heap {
145+
c.pinned_heap(true);
146+
}
147+
144148
match opts.codegen {
145149
CodegenOutput::Obj => c.object_file(&opts.output)?,
146150
CodegenOutput::SharedObj => c.shared_object_file(&opts.output)?,

lucetc/lucetc/options.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ pub struct Options {
120120
pub pk_path: Option<PathBuf>,
121121
pub sk_path: Option<PathBuf>,
122122
pub count_instructions: bool,
123+
pub pinned_heap: bool,
123124
pub error_style: ErrorStyle,
124125
pub target: Triple,
125126
}
@@ -212,6 +213,7 @@ impl Options {
212213
let sk_path = m.value_of("sk_path").map(PathBuf::from);
213214
let pk_path = m.value_of("pk_path").map(PathBuf::from);
214215
let count_instructions = m.is_present("count_instructions");
216+
let pinned_heap = m.is_present("pinned_heap");
215217

216218
let error_style = match m.value_of("error_style") {
217219
None => ErrorStyle::default(),
@@ -240,6 +242,7 @@ impl Options {
240242
sk_path,
241243
pk_path,
242244
count_instructions,
245+
pinned_heap,
243246
error_style,
244247
target,
245248
})

0 commit comments

Comments
 (0)