diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-03-19 08:23:37 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-03-19 08:23:37 +0100 |
commit | fd4fbfea4aa99b325fbb9fb4d1568dd5f15881df (patch) | |
tree | de80d8165c26546487758053edd9c44bb46a4cd3 /src | |
parent | 77d23ca7d4d5dc20b337b0d6152346acef1926fd (diff) | |
download | ghdl-fd4fbfea4aa99b325fbb9fb4d1568dd5f15881df.tar.gz ghdl-fd4fbfea4aa99b325fbb9fb4d1568dd5f15881df.tar.bz2 ghdl-fd4fbfea4aa99b325fbb9fb4d1568dd5f15881df.zip |
ghdldrv: avoid to pass -P options two times.
Diffstat (limited to 'src')
-rw-r--r-- | src/ghdldrv/ghdldrv.adb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ghdldrv/ghdldrv.adb b/src/ghdldrv/ghdldrv.adb index 3aacf728f..3442ba157 100644 --- a/src/ghdldrv/ghdldrv.adb +++ b/src/ghdldrv/ghdldrv.adb @@ -624,7 +624,13 @@ package body Ghdldrv is Add_Argument (Compiler_Args, new String'("--mb-comments")); Res := Option_Ok; elsif Options.Parse_Option (Opt) then - Add_Argument (Compiler_Args, new String'(Opt)); + if Opt'Length > 2 and then Opt (1 .. 2) = "-P" then + -- Discard -Pxxx switches, as they are already added to + -- compiler_args. + null; + else + Add_Argument (Compiler_Args, new String'(Opt)); + end if; Res := Option_Ok; elsif Opt'Length >= 2 and then (Opt (2) = 'O' or Opt (2) = 'f') |