summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--src/main.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 3e8dd1a9..a7b3010d 100644
--- a/Makefile
+++ b/Makefile
@@ -48,6 +48,7 @@ CXXFLAGS += -Wno-misleading-indentation
# - Flags to pass to all mrustc invocations
RUST_FLAGS := --cfg debug_assertions
RUST_FLAGS += -g
+RUST_FLAGS += -O
SHELL = bash
diff --git a/src/main.cpp b/src/main.cpp
index 83fd5ac3..1c52de8c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -484,6 +484,7 @@ int main(int argc, char *argv[])
// - MIR Exportable (public generic, #[inline], or used by a either of those)
// - Require codegen (public or used by an exported function)
TransOptions trans_opt;
+ trans_opt.opt_level = params.opt_level;
for(const char* libdir : params.lib_search_dirs ) {
trans_opt.library_search_dirs.push_back( libdir );
}