Skip to content

Commit

Permalink
Rust CSR: generate has_X for CONFIG_X=Y where Y is non-zero integer.
Browse files Browse the repository at this point in the history
whitequark committed Nov 8, 2016
1 parent ad414a7 commit 642c198
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions misoc/integration/cpu_interface.py
Original file line number Diff line number Diff line change
@@ -224,6 +224,8 @@ def get_rust_cfg(regions, constants):
for name, value in constants:
if name.upper().startswith("CONFIG_"):
r += "--cfg '"+name.lower()[7:]+"=\""+str(value)+"\"'\n"
if isinstance(value, int) and value != 0:
r += "--cfg has_"+name.lower()[7:]+"\n"
return r


0 comments on commit 642c198

Please sign in to comment.