Skip to content

Commit e997558

Browse files
jfngwhitequark
authored andcommitted
build.plat: replace -+ characters in _all_toolchain_env_vars.
Mixed-case variables are allowed since af7c114, but '-' or '+' must be replaced to avoid invalid names (e.g. "$AMARANTH_ENV_oss-cad-suite").
1 parent a70cfa0 commit e997558

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

amaranth/build/plat.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ def _toolchain_env_var(self):
7676
# TODO(amaranth-0.5): remove
7777
@property
7878
def _all_toolchain_env_vars(self):
79-
return (f"AMARANTH_ENV_{self.toolchain}", self._toolchain_env_var,)
79+
return (
80+
f"AMARANTH_ENV_{self.toolchain.replace('-', '_').replace('+', 'X')}",
81+
self._toolchain_env_var,
82+
)
8083

8184
def build(self, elaboratable, name="top",
8285
build_dir="build", do_build=True,

0 commit comments

Comments
 (0)