aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-01-20 21:29:42 +0100
committerTristan Gingold <tgingold@free.fr>2021-01-20 21:29:42 +0100
commit93ca27c43d5f7c4ce8abfade5e8c42b81108ebf5 (patch)
tree9d201b53e4a739128f4fa891b307df80872f7114 /src
parent20c5d3b2ef15833d6f01eefc5b2b2a89736c1538 (diff)
downloadghdl-93ca27c43d5f7c4ce8abfade5e8c42b81108ebf5.tar.gz
ghdl-93ca27c43d5f7c4ce8abfade5e8c42b81108ebf5.tar.bz2
ghdl-93ca27c43d5f7c4ce8abfade5e8c42b81108ebf5.zip
src/ghdldrv: fix regression for ghdl-yosys-plugin
Allow to do multiple synthesis
Diffstat (limited to 'src')
-rw-r--r--src/ghdldrv/ghdllocal.adb11
-rw-r--r--src/ghdldrv/ghdlmain.adb3
-rw-r--r--src/ghdldrv/ghdlsynth.adb2
3 files changed, 12 insertions, 4 deletions
diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb
index e8f7521c6..b77992520 100644
--- a/src/ghdldrv/ghdllocal.adb
+++ b/src/ghdldrv/ghdllocal.adb
@@ -42,18 +42,23 @@ package body Ghdllocal is
-- If TRUE, generate 32bits code on 64bits machines.
Flag_32bit : Boolean := False;
- procedure Compile_Init is
+ procedure Initialize_Flags is
begin
- Options.Initialize;
Flag_Ieee := Lib_Standard;
Flag_Verbose := False;
+ end Initialize_Flags;
+
+ procedure Compile_Init is
+ begin
+ Options.Initialize;
+ Initialize_Flags;
end Compile_Init;
procedure Init (Cmd : in out Command_Lib)
is
pragma Unreferenced (Cmd);
begin
- Compile_Init;
+ Initialize_Flags;
end Init;
function Is_Generic_Override_Option (Opt : String) return Boolean
diff --git a/src/ghdldrv/ghdlmain.adb b/src/ghdldrv/ghdlmain.adb
index 59e615c18..e1680c3c7 100644
--- a/src/ghdldrv/ghdlmain.adb
+++ b/src/ghdldrv/ghdlmain.adb
@@ -434,6 +434,9 @@ package body Ghdlmain is
Errorout.Console.Set_Program_Name (Command_Name);
Errorout.Console.Install_Handler;
+ -- Initialize global structures.
+ Options.Initialize;
+
-- Handle case of no argument
if Argument_Count = 0 then
Error ("missing command, try " & Command_Name & " 'help'");
diff --git a/src/ghdldrv/ghdlsynth.adb b/src/ghdldrv/ghdlsynth.adb
index c6183a193..d754f1663 100644
--- a/src/ghdldrv/ghdlsynth.adb
+++ b/src/ghdldrv/ghdlsynth.adb
@@ -586,8 +586,8 @@ package body Ghdlsynth is
procedure Init_For_Ghdl_Synth is
begin
Ghdlsynth.Register_Commands;
- Options.Initialize;
Errorout.Console.Install_Handler;
+ Options.Initialize;
Netlists.Errors.Initialize;
end Init_For_Ghdl_Synth;
end Ghdlsynth;