diff options
Diffstat (limited to 'plugins/dwarf/dwarf_import/src')
| -rw-r--r-- | plugins/dwarf/dwarf_import/src/lib.rs | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/plugins/dwarf/dwarf_import/src/lib.rs b/plugins/dwarf/dwarf_import/src/lib.rs index 8ad5e442..6e9626aa 100644 --- a/plugins/dwarf/dwarf_import/src/lib.rs +++ b/plugins/dwarf/dwarf_import/src/lib.rs @@ -756,8 +756,7 @@ impl CustomDebugInfoParser for DWARFParser { } } -#[no_mangle] -pub extern "C" fn CorePluginInit() -> bool { +fn plugin_init() { Logger::new("DWARF").init(); let settings = Settings::new(); @@ -820,5 +819,20 @@ pub extern "C" fn CorePluginInit() -> bool { ); DebugInfoParser::register("DWARF", DWARFParser {}); +} + +#[no_mangle] +#[allow(non_snake_case)] +#[cfg(not(feature = "demo"))] +pub extern "C" fn CorePluginInit() -> bool { + plugin_init(); + true +} + +#[no_mangle] +#[allow(non_snake_case)] +#[cfg(feature = "demo")] +pub extern "C" fn DwarfImportPluginInit() -> bool { + plugin_init(); true } |
