_toolchain: new module, for injecting dependencies in e.g. Nix.

This commit is contained in:
whitequark 2019-08-28 11:32:18 +00:00
parent 2168ff512b
commit b14f5572d8
3 changed files with 20 additions and 6 deletions

View file

@ -6,6 +6,7 @@ import re
import jinja2
from .. import __version__
from .._toolchain import *
from ..hdl.ast import *
from ..hdl.cd import *
from ..hdl.dsl import *
@ -263,10 +264,6 @@ class TemplatedPlatform(Platform):
assert False
return "\n".join(commands)
def get_tool(tool):
tool_env = tool.upper().replace("-", "_")
return os.environ.get(tool_env, tool)
def get_override(var):
var_env = "NMIGEN_{}".format(var)
if var_env in os.environ: