aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ghdldrv/ghdlrun.adb2
-rw-r--r--src/grt/Makefile.inc2
-rw-r--r--src/grt/ghdl_main.adb7
-rw-r--r--src/grt/grt-main.adb5
4 files changed, 9 insertions, 7 deletions
diff --git a/src/ghdldrv/ghdlrun.adb b/src/ghdldrv/ghdlrun.adb
index 3f96bf456..758966231 100644
--- a/src/ghdldrv/ghdlrun.adb
+++ b/src/ghdldrv/ghdlrun.adb
@@ -805,6 +805,8 @@ package body Ghdlrun is
Put_Line ("Starting simulation");
end if;
+ Grt.Modules.Register_Modules;
+
Grt.Main.Run;
Ada.Command_Line.Set_Exit_Status
diff --git a/src/grt/Makefile.inc b/src/grt/Makefile.inc
index c8e0d9f06..2ca9e9420 100644
--- a/src/grt/Makefile.inc
+++ b/src/grt/Makefile.inc
@@ -154,7 +154,7 @@ grt/run-bind.adb: grt $(GRT_SRC_DEPS) grt-force
# Set No Run-Time flag to suppress references to standard gnat library.
sed -e '/^P /s/P /P NR /' < grt/ghdl_main.ali > grt/ghdl_main-tmp.ali
$(MV) grt/ghdl_main-tmp.ali grt/ghdl_main.ali
- cd grt && $(GNATMAKE) -b ghdl_main.ali -bargs -Lgrt_ -o run-bind.adb -n
+ cd grt && $(GNATMAKE) -b ghdl_main.ali -bargs -Lgrt_ -o run-bind.adb -n
grt:
mkdir grt
diff --git a/src/grt/ghdl_main.adb b/src/grt/ghdl_main.adb
index 92e69c362..fd1a76ef4 100644
--- a/src/grt/ghdl_main.adb
+++ b/src/grt/ghdl_main.adb
@@ -24,6 +24,7 @@ with Ada.Unchecked_Conversion;
with Grt.Options; use Grt.Options;
with Grt.Main;
with Grt.Types; use Grt.Types;
+with Grt.Modules;
-- Some files are only referenced from compiled code. With it here so that
-- they get compiled during build (and elaborated).
@@ -45,7 +46,7 @@ is
Args : constant Grt.Options.Argv_Type := To_Argv_Type (Argv);
Progname : Ghdl_C_String := null;
begin
- -- Ada elaboration.
+ -- Self Ada elaboration.
Grt_Init;
-- Set the options.
@@ -54,6 +55,10 @@ begin
end if;
Grt.Main.Run_Options (Progname, Argc, Args);
+ -- Register modules.
+ -- They may insert hooks.
+ Grt.Modules.Register_Modules;
+
-- Initialize, elaborate and simulate.
Grt.Main.Run;
diff --git a/src/grt/grt-main.adb b/src/grt/grt-main.adb
index e6c71e120..35161f686 100644
--- a/src/grt/grt-main.adb
+++ b/src/grt/grt-main.adb
@@ -28,7 +28,6 @@ with Grt.Signals;
with Grt.Options; use Grt.Options;
with Grt.Stats;
with Grt.Hooks;
-with Grt.Modules;
with Grt.Change_Generics;
-- The following packages are not referenced in this package.
@@ -123,10 +122,6 @@ package body Grt.Main is
-- Set stream for error messages
Grt.Errors.Set_Error_Stream (Grt.Stdio.stdout);
- -- Register modules.
- -- They may insert hooks.
- Grt.Modules.Register_Modules;
-
-- Decode options.
Grt.Options.Decode (Stop);