diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-01-05 07:56:36 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-01-05 22:19:09 +0100 |
commit | 7d9eb240cf987b16ff01beb92f4408b37a297c0d (patch) | |
tree | ba6f7c1bd419dcf7c3e59bfd9f80668efe07cd04 /src/grt | |
parent | 456c28b50ce95dca9fb0576de161051816b6c2dc (diff) | |
download | ghdl-7d9eb240cf987b16ff01beb92f4408b37a297c0d.tar.gz ghdl-7d9eb240cf987b16ff01beb92f4408b37a297c0d.tar.bz2 ghdl-7d9eb240cf987b16ff01beb92f4408b37a297c0d.zip |
grt: add modules in ghdl_main instead of grt-main
Diffstat (limited to 'src/grt')
-rw-r--r-- | src/grt/Makefile.inc | 2 | ||||
-rw-r--r-- | src/grt/ghdl_main.adb | 7 | ||||
-rw-r--r-- | src/grt/grt-main.adb | 5 |
3 files changed, 7 insertions, 7 deletions
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); |