diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-09-07 20:10:50 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-09-07 20:10:50 +0200 |
commit | ea8d2686efd3a8474eb5beef8aa25b5e2e5c0bd5 (patch) | |
tree | a6ec44c35be1e2a9aef8b876789b522608ebe74c /src/ghdldrv/ghdlcomp.adb | |
parent | d8817ae392bd92c05f98914993082e4c995898f3 (diff) | |
download | ghdl-ea8d2686efd3a8474eb5beef8aa25b5e2e5c0bd5.tar.gz ghdl-ea8d2686efd3a8474eb5beef8aa25b5e2e5c0bd5.tar.bz2 ghdl-ea8d2686efd3a8474eb5beef8aa25b5e2e5c0bd5.zip |
ghdllocal: generalize top level unit extraction
Diffstat (limited to 'src/ghdldrv/ghdlcomp.adb')
-rw-r--r-- | src/ghdldrv/ghdlcomp.adb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ghdldrv/ghdlcomp.adb b/src/ghdldrv/ghdlcomp.adb index c778ecfb5..541e8b7cb 100644 --- a/src/ghdldrv/ghdlcomp.adb +++ b/src/ghdldrv/ghdlcomp.adb @@ -331,7 +331,11 @@ package body Ghdlcomp is Prim_Id : Name_Id; Sec_Id : Name_Id; begin - Extract_Elab_Unit (Cmd_Name, Args, Opt_Arg, Lib_Id, Prim_Id, Sec_Id); + Extract_Elab_Unit + (Cmd_Name, True, Args, Opt_Arg, Lib_Id, Prim_Id, Sec_Id); + if Prim_Id = Null_Identifier then + raise Option_Error; + end if; Flags.Flag_Elaborate := True; @@ -743,7 +747,7 @@ package body Ghdlcomp is Unit : Iir_Design_Unit; Lib : Iir_Library_Declaration; begin - Extract_Elab_Unit ("-m", Args, Next_Arg, Lib_Id, Prim_Id, Sec_Id); + Extract_Elab_Unit ("-m", False, Args, Next_Arg, Lib_Id, Prim_Id, Sec_Id); if not Setup_Libraries (True) then return; end if; @@ -889,7 +893,7 @@ package body Ghdlcomp is Next_Arg : Natural; begin Extract_Elab_Unit - ("--gen-makefile", Args, Next_Arg, Lib_Id, Prim_Id, Sec_Id); + ("--gen-makefile", False, Args, Next_Arg, Lib_Id, Prim_Id, Sec_Id); if not Setup_Libraries (True) then return; end if; |