summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index b8219c48..4d8c0b0a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -271,6 +271,14 @@ int main(int argc, char *argv[])
return 0;
}
+ // Allocator and panic strategies
+ if( crate.m_crate_type == ::AST::Crate::Type::Executable )
+ {
+ // TODO: Detect if an allocator crate is already present.
+ crate.load_extern_crate(Span(), "alloc_system");
+ crate.load_extern_crate(Span(), "panic_abort");
+ }
+
// Resolve names to be absolute names (include references to the relevant struct/global/function)
// - This does name checking on types and free functions.
// - Resolves all identifiers/paths to references