diff options
Diffstat (limited to 'asmcomp/compilenv.ml')
-rw-r--r-- | asmcomp/compilenv.ml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/asmcomp/compilenv.ml b/asmcomp/compilenv.ml index 647501b87..21833342f 100644 --- a/asmcomp/compilenv.ml +++ b/asmcomp/compilenv.ml @@ -77,7 +77,13 @@ let reset name = current_unit.ui_force_link <- false let current_unit_name () = - "caml" ^ current_unit.ui_name + current_unit.ui_name + +let make_symbol ?(unitname = current_unit.ui_name) idopt = + let prefix = "caml" ^ unitname in + match idopt with + | None -> prefix + | Some id -> prefix ^ "__" ^ id let read_unit_info filename = let ic = open_in_bin filename in |