build/argument_parser: Minor styles changes.
This commit is contained in:
parent
8040c83268
commit
c62306d57e
litex/build
|
@ -58,9 +58,9 @@ class LiteXArgumentParser(argparse.ArgumentParser):
|
||||||
self._target_group = self.add_argument_group(title="Target options")
|
self._target_group = self.add_argument_group(title="Target options")
|
||||||
if toolchains is not None:
|
if toolchains is not None:
|
||||||
self.add_target_argument("--toolchain",
|
self.add_target_argument("--toolchain",
|
||||||
default=self._default_toolchain,
|
default = self._default_toolchain,
|
||||||
choices=toolchains,
|
choices = toolchains,
|
||||||
help="FPGA toolchain ({}).".format(" or ".join(toolchains)))
|
help = "FPGA toolchain ({}).".format(" or ".join(toolchains)))
|
||||||
else:
|
else:
|
||||||
self.add_target_argument("-toolchain", help="FPGA toolchain")
|
self.add_target_argument("-toolchain", help="FPGA toolchain")
|
||||||
self.add_target_argument("--build", action="store_true", help="Build design.")
|
self.add_target_argument("--build", action="store_true", help="Build design.")
|
||||||
|
@ -147,8 +147,7 @@ class LiteXArgumentParser(argparse.ArgumentParser):
|
||||||
|
|
||||||
# Intercept selected toolchain to fill arguments.
|
# Intercept selected toolchain to fill arguments.
|
||||||
if self._platform is not None:
|
if self._platform is not None:
|
||||||
self._toolchain = self.get_value_from_key("--toolchain",
|
self._toolchain = self.get_value_from_key("--toolchain", self._default_toolchain)
|
||||||
self._default_toolchain)
|
|
||||||
if self._toolchain is not None:
|
if self._toolchain is not None:
|
||||||
self._platform.fill_args(self._toolchain, self)
|
self._platform.fill_args(self._toolchain, self)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue