Skip to content

Support SLANG_PLUGIN_PATH env var for custom slang plugin location - #4131

Merged
maliberty merged 2 commits into
The-OpenROAD-Project:masterfrom
oharboe:slang-plugin-path
Apr 11, 2026
Merged

maliberty merged 2 commits into
The-OpenROAD-Project:masterfrom
oharboe:slang-plugin-path

Conversation

@oharboe

@oharboe oharboe commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

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.

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>
@oharboe
oharboe requested a review from maliberty April 10, 2026 10:28
@maliberty

Copy link
Copy Markdown
Member

Why not put this in variables.yaml with a default of "slang"?

Instead of a custom env var check, define SLANG_PLUGIN_PATH as a
regular flow variable with a default of "slang". This follows
the standard ORFS variable pattern and makes the option visible
in the flow documentation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@oharboe

oharboe commented Apr 11, 2026

Copy link
Copy Markdown
Collaborator Author

Why not put this in variables.yaml with a default of "slang"?

Fixed.

@maliberty
maliberty merged commit dba71f5 into The-OpenROAD-Project:master Apr 11, 2026
5 checks passed
@oharboe
oharboe deleted the slang-plugin-path branch April 19, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants