Skip to content

Commit 6e3c3f1

Browse files
oharboeclaude
andcommitted
Support SLANG_PLUGIN_PATH env var for custom slang plugin location
When SYNTH_HDL_FRONTEND=slang, the plugin load is hardcoded as `plugin -i slang`. This adds a check for SLANG_PLUGIN_PATH, falling back to the current behavior when unset. This enables Bazel-built slang plugins to be loaded from a custom path, which is needed for downstream consumers that build yosys-slang from source. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent 2453de8 commit 6e3c3f1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

flow/scripts/synth_preamble.tcl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ proc read_design_sources { } {
4444
}
4545

4646
if { [env_var_equals SYNTH_HDL_FRONTEND slang] } {
47-
plugin -i slang
47+
if { [info exists ::env(SLANG_PLUGIN_PATH)] } {
48+
plugin -i $::env(SLANG_PLUGIN_PATH)
49+
} else {
50+
plugin -i slang
51+
}
4852

4953
set slang_args [list \
5054
-D SYNTHESIS --keep-hierarchy --compat=vcs --ignore-assertions --top $::env(DESIGN_NAME) \

0 commit comments

Comments
 (0)