From: whitequark Date: Thu, 9 Jul 2020 17:52:52 +0000 (+0000) Subject: cxxrtl: add missing extern "C". X-Git-Tag: working-ls180~392^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ab59e33b2bb690ef02dabfc42fffd752c6a6e864;p=yosys.git cxxrtl: add missing extern "C". This bug was hidden if a header was generated. --- diff --git a/backends/cxxrtl/cxxrtl_backend.cc b/backends/cxxrtl/cxxrtl_backend.cc index 5e5ba5ac0..6d3c2f4f9 100644 --- a/backends/cxxrtl/cxxrtl_backend.cc +++ b/backends/cxxrtl/cxxrtl_backend.cc @@ -1935,6 +1935,7 @@ struct CxxrtlWorker { f << "} // namespace " << design_ns << "\n"; f << "\n"; if (top_module != nullptr && debug_info) { + f << "extern \"C\"\n"; f << "cxxrtl_toplevel " << design_ns << "_create() {\n"; inc_indent(); std::string top_type = design_ns + "::" + mangle(top_module);