aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ghdldrv/ghdlsimul.adb13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ghdldrv/ghdlsimul.adb b/src/ghdldrv/ghdlsimul.adb
index ff64fcf17..c5e950836 100644
--- a/src/ghdldrv/ghdlsimul.adb
+++ b/src/ghdldrv/ghdlsimul.adb
@@ -45,6 +45,7 @@ with Grt.Vpi;
pragma Unreferenced (Grt.Vpi);
with Grt.Types;
with Grt.Options;
+with Grt.Errors;
with Grtlink;
package body Ghdlsimul is
@@ -160,7 +161,7 @@ package body Ghdlsimul is
when Decode_Option_Last =>
exit;
when Decode_Option_Stop =>
- exit;
+ Grt.Options.Flag_No_Run := True;
when Decode_Option_Ok =>
null;
end case;
@@ -170,8 +171,16 @@ package body Ghdlsimul is
end loop;
end Set_Run_Options;
- procedure Run is
+ procedure Run
+ is
+ use Ada.Command_Line;
begin
+ if Grt.Options.Flag_No_Run then
+ -- Some options like --has-feature set the exit status.
+ Set_Exit_Status (Exit_Status (Grt.Errors.Exit_Status));
+ return;
+ end if;
+
Grtlink.Flag_String := Flags.Flag_String;
Simulation.Simulation_Entity (Top_Conf);