diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-11-30 21:13:03 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-12-01 04:35:16 +0100 |
commit | b5f86659f859eac6a9e13a15387ec245f04bf968 (patch) | |
tree | b297eb1abe590bb7a3da2bce4210521152895ddd /src | |
parent | 2cfea420b530e95be0442acbdce523b22055fe8b (diff) | |
download | ghdl-b5f86659f859eac6a9e13a15387ec245f04bf968.tar.gz ghdl-b5f86659f859eac6a9e13a15387ec245f04bf968.tar.bz2 ghdl-b5f86659f859eac6a9e13a15387ec245f04bf968.zip |
ghdl -i: stop on error.
Fix #474
Diffstat (limited to 'src')
-rw-r--r-- | src/ghdldrv/ghdllocal.adb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb index ff3531c27..cf708d288 100644 --- a/src/ghdldrv/ghdllocal.adb +++ b/src/ghdldrv/ghdllocal.adb @@ -680,6 +680,8 @@ package body Ghdllocal is procedure Perform_Action (Cmd : in out Command_Import; Args : Argument_List) is pragma Unreferenced (Cmd); + use Errorout; + Id : Name_Id; Design_File : Iir_Design_File; Unit : Iir; @@ -711,6 +713,10 @@ package body Ghdllocal is end if; end loop; + if Nbr_Errors > 0 then + raise Compilation_Error; + end if; + -- Analyze all files. if False then Design_File := Get_Design_File_Chain (Libraries.Work_Library); @@ -734,7 +740,7 @@ package body Ghdllocal is Libraries.Save_Work_Library; exception - when Errorout.Compilation_Error => + when Compilation_Error => Error ("importation has failed due to compilation error"); raise; end Perform_Action; |