summaryrefslogtreecommitdiff
path: root/translate/ghdldrv
diff options
context:
space:
mode:
authorgingold2008-08-31 02:22:57 +0000
committergingold2008-08-31 02:22:57 +0000
commitb42e36e23f23a0d27e7b08d6cb4461237720de3b (patch)
tree05c59df8138658b9f811510264c32bb753123bc0 /translate/ghdldrv
parent1d5464fd378387a0e17021af24065784ea66bb47 (diff)
downloadghdl-b42e36e23f23a0d27e7b08d6cb4461237720de3b.tar.gz
ghdl-b42e36e23f23a0d27e7b08d6cb4461237720de3b.tar.bz2
ghdl-b42e36e23f23a0d27e7b08d6cb4461237720de3b.zip
Create package options from flags to avoid circular elaboration
Diffstat (limited to 'translate/ghdldrv')
-rw-r--r--translate/ghdldrv/ghdldrv.adb3
-rw-r--r--translate/ghdldrv/ghdllocal.adb9
-rw-r--r--translate/ghdldrv/ghdlmain.adb4
-rw-r--r--translate/ghdldrv/ghdlprint.adb1
4 files changed, 11 insertions, 6 deletions
diff --git a/translate/ghdldrv/ghdldrv.adb b/translate/ghdldrv/ghdldrv.adb
index 9de01b4..b21d633 100644
--- a/translate/ghdldrv/ghdldrv.adb
+++ b/translate/ghdldrv/ghdldrv.adb
@@ -36,6 +36,7 @@ with System;
with Ghdlmain; use Ghdlmain;
with Ghdllocal; use Ghdllocal;
with Version;
+with Options;
package body Ghdldrv is
-- Name of the tools used.
@@ -655,7 +656,7 @@ package body Ghdldrv is
Add_Argument (Compiler_Args, new String'(Opt));
Flag_Expect_Failure := True;
Res := Option_Ok;
- elsif Flags.Parse_Option (Opt) then
+ elsif Options.Parse_Option (Opt) then
Add_Argument (Compiler_Args, new String'(Opt));
Res := Option_Ok;
elsif Opt'Length >= 2
diff --git a/translate/ghdldrv/ghdllocal.adb b/translate/ghdldrv/ghdllocal.adb
index 6565f9d..310dabb 100644
--- a/translate/ghdldrv/ghdllocal.adb
+++ b/translate/ghdldrv/ghdllocal.adb
@@ -33,6 +33,7 @@ with Configuration;
with Files_Map;
with Post_Sems;
with Disp_Tree;
+with Options;
package body Ghdllocal is
-- Version of the IEEE library to use. This just change pathes.
@@ -137,7 +138,7 @@ package body Ghdllocal is
-- Silently accept -g and -O.
Res := Option_Ok;
else
- if Flags.Parse_Option (Opt) then
+ if Options.Parse_Option (Opt) then
Res := Option_Ok;
end if;
end if;
@@ -161,9 +162,11 @@ package body Ghdllocal is
P (" none: do not use a predefined ieee library");
end Disp_Long_Help;
- function Get_Version_Path return String is
+ function Get_Version_Path return String
+ is
+ use Flags;
begin
- case Flags.Vhdl_Std is
+ case Vhdl_Std is
when Vhdl_87 =>
return "v87";
when Vhdl_93c
diff --git a/translate/ghdldrv/ghdlmain.adb b/translate/ghdldrv/ghdlmain.adb
index b77ceca..7cbada3 100644
--- a/translate/ghdldrv/ghdlmain.adb
+++ b/translate/ghdldrv/ghdlmain.adb
@@ -18,8 +18,8 @@
with Ada.Text_IO;
with Ada.Command_Line;
with Version;
-with Flags;
with Bug;
+with Options;
package body Ghdlmain is
procedure Init (Cmd : in out Command_Type)
@@ -183,7 +183,7 @@ package body Ghdlmain is
Error
("warning: command '--option-help' does not accept any argument");
end if;
- Flags.Disp_Options_Help;
+ Options.Disp_Options_Help;
end Perform_Action;
-- Command Version
diff --git a/translate/ghdldrv/ghdlprint.adb b/translate/ghdldrv/ghdlprint.adb
index 3dc5550..7a95854 100644
--- a/translate/ghdldrv/ghdlprint.adb
+++ b/translate/ghdldrv/ghdlprint.adb
@@ -75,6 +75,7 @@ package body Ghdlprint is
procedure PP_Html_File (File : Source_File_Entry)
is
+ use Flags;
use Scan;
use Tokens;
use Files_Map;