summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Richardson2020-05-14 18:01:16 +0100
committerAlex Richardson2020-05-15 13:43:47 +0100
commite6354d8ceea7217e1544606c3c2b79bca4e582fe (patch)
tree5263a346c514c027aaf836a7651778460bb68bc2
parentf1ffbfcadfeb013c1619af9d98770872c1ec230f (diff)
Add static to more C functions
This allows me to compile sail-riscv64 and sail-riscv128 code in the same static library.
-rw-r--r--src/jib/c_backend.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jib/c_backend.ml b/src/jib/c_backend.ml
index fa4fa802..e5486645 100644
--- a/src/jib/c_backend.ml
+++ b/src/jib/c_backend.ml
@@ -1592,7 +1592,7 @@ let codegen_type_def ctx = function
in
let codegen_undefined =
let name = sgen_id id in
- string (Printf.sprintf "enum %s UNDEFINED(%s)(unit u) { return %s; }" name name (sgen_id first_id))
+ string (Printf.sprintf "static enum %s UNDEFINED(%s)(unit u) { return %s; }" name name (sgen_id first_id))
in
string (Printf.sprintf "// enum %s" (string_of_id id)) ^^ hardline
^^ separate space [string "enum"; codegen_id id; lbrace; separate_map (comma ^^ space) codegen_id ids; rbrace ^^ semi]