From 56f6228c42f05ca9079b0c62a32a45bf7d46f9c9 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 2 Jul 2019 19:01:48 +0200 Subject: libghdlsynth: do not depend on ghdlsimul. --- src/synth/libghdlsynth.adb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/synth/libghdlsynth.adb b/src/synth/libghdlsynth.adb index 3402cb0e1..37f5a8e30 100644 --- a/src/synth/libghdlsynth.adb +++ b/src/synth/libghdlsynth.adb @@ -18,9 +18,10 @@ -- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, -- MA 02110-1301, USA. -with Ghdlsynth; -with Ghdlsimul; with GNAT.OS_Lib; use GNAT.OS_Lib; + +with Ghdlsynth; +with Options; use Options; with Errorout.Console; package body Libghdlsynth is @@ -29,6 +30,7 @@ package body Libghdlsynth is Args : Argument_List (1 .. Argc); Res : Module; begin + -- Create arguments list. for I in 0 .. Argc - 1 loop declare Arg : constant Ghdl_C_String := Argv (I); @@ -36,14 +38,19 @@ package body Libghdlsynth is Args (I + 1) := new String'(Arg (1 .. strlen (Arg))); end; end loop; + + -- Do the real work! Res := Ghdlsynth.Ghdl_Synth (Args); return Res; + exception + when Option_Error => + return No_Module; end Synth; Gnat_Version : constant String := "unknown compiler version" & ASCII.NUL; pragma Export (C, Gnat_Version, "__gnat_version"); begin + Options.Initialize; Errorout.Console.Install_Handler; - Ghdlsimul.Compile_Init; end Libghdlsynth; -- cgit v1.2.3