Rename tezos_compiler.ml
This commit is contained in:
parent
dc5c4910cf
commit
3d21245959
@ -161,13 +161,13 @@ COMPILER_LIB_INTFS := \
|
|||||||
compiler/embedded_cmis.mli \
|
compiler/embedded_cmis.mli \
|
||||||
compiler/registerer.mli \
|
compiler/registerer.mli \
|
||||||
compiler/packer.mli \
|
compiler/packer.mli \
|
||||||
compiler/tezos_compiler.mli \
|
compiler/native.mli \
|
||||||
|
|
||||||
COMPILER_LIB_IMPLS := \
|
COMPILER_LIB_IMPLS := \
|
||||||
compiler/embedded_cmis.ml \
|
compiler/embedded_cmis.ml \
|
||||||
compiler/registerer.ml \
|
compiler/registerer.ml \
|
||||||
compiler/packer.ml \
|
compiler/packer.ml \
|
||||||
compiler/tezos_compiler.ml \
|
compiler/native.ml \
|
||||||
|
|
||||||
COMPILER_IMPLS := \
|
COMPILER_IMPLS := \
|
||||||
compiler_main.ml \
|
compiler_main.ml \
|
||||||
|
@ -39,7 +39,7 @@ let commands () =
|
|||||||
(fun () dirname cctxt ->
|
(fun () dirname cctxt ->
|
||||||
Lwt.catch
|
Lwt.catch
|
||||||
(fun () ->
|
(fun () ->
|
||||||
let _hash, proto = Tezos_compiler.read_dir dirname in
|
let _hash, proto = Native.read_dir dirname in
|
||||||
Client_node_rpcs.inject_protocol cctxt.rpc_config proto >>= function
|
Client_node_rpcs.inject_protocol cctxt.rpc_config proto >>= function
|
||||||
| Ok hash ->
|
| Ok hash ->
|
||||||
cctxt.message "Injected protocol %a successfully" Protocol_hash.pp_short hash >>= fun () ->
|
cctxt.message "Injected protocol %a successfully" Protocol_hash.pp_short hash >>= fun () ->
|
||||||
|
@ -13,14 +13,14 @@ let packer_name = "tezos-protocol-packer"
|
|||||||
let () =
|
let () =
|
||||||
if Filename.basename Sys.argv.(0) = packer_name then begin
|
if Filename.basename Sys.argv.(0) = packer_name then begin
|
||||||
try
|
try
|
||||||
Tezos_compiler.main ();
|
Native.main ();
|
||||||
Pervasives.exit 0
|
Pervasives.exit 0
|
||||||
with exn ->
|
with exn ->
|
||||||
Format.eprintf "%a\n%!" Opterrors.report_error exn;
|
Format.eprintf "%a\n%!" Opterrors.report_error exn;
|
||||||
Pervasives.exit 1
|
Pervasives.exit 1
|
||||||
end else if Filename.basename Sys.argv.(0) = compiler_name then begin
|
end else if Filename.basename Sys.argv.(0) = compiler_name then begin
|
||||||
try
|
try
|
||||||
Tezos_compiler.main ();
|
Native.main ();
|
||||||
Pervasives.exit 0
|
Pervasives.exit 0
|
||||||
with exn ->
|
with exn ->
|
||||||
Format.eprintf "%a\n%!" Opterrors.report_error exn;
|
Format.eprintf "%a\n%!" Opterrors.report_error exn;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
let () =
|
let () =
|
||||||
try
|
try
|
||||||
Tezos_compiler.main ();
|
Native.main ();
|
||||||
Pervasives.exit 0
|
Pervasives.exit 0
|
||||||
with exn ->
|
with exn ->
|
||||||
Format.eprintf "%a\n%!" Opterrors.report_error exn;
|
Format.eprintf "%a\n%!" Opterrors.report_error exn;
|
||||||
|
@ -60,7 +60,7 @@ let create_files dir units =
|
|||||||
|
|
||||||
let extract dir ?hash (p: Protocol.t) =
|
let extract dir ?hash (p: Protocol.t) =
|
||||||
create_files dir p.components >>= fun _files ->
|
create_files dir p.components >>= fun _files ->
|
||||||
Tezos_compiler.Meta.to_file dir
|
Native.Meta.to_file dir
|
||||||
?hash
|
?hash
|
||||||
~env_version:p.expected_env
|
~env_version:p.expected_env
|
||||||
(List.map (fun {Protocol.name} -> String.capitalize_ascii name) p.components) ;
|
(List.map (fun {Protocol.name} -> String.capitalize_ascii name) p.components) ;
|
||||||
@ -76,7 +76,7 @@ let do_compile hash p =
|
|||||||
Format.asprintf "protocol_%a.cmxs" Protocol_hash.pp hash
|
Format.asprintf "protocol_%a.cmxs" Protocol_hash.pp hash
|
||||||
in
|
in
|
||||||
create_files source_dir units >>= fun _files ->
|
create_files source_dir units >>= fun _files ->
|
||||||
Tezos_compiler.Meta.to_file source_dir ~hash
|
Native.Meta.to_file source_dir ~hash
|
||||||
(List.map (fun {Protocol.name} -> String.capitalize_ascii name) units);
|
(List.map (fun {Protocol.name} -> String.capitalize_ascii name) units);
|
||||||
let compiler_command =
|
let compiler_command =
|
||||||
(Sys.executable_name,
|
(Sys.executable_name,
|
||||||
|
Loading…
Reference in New Issue
Block a user