From fcc9ec09d675da69dd7c2dbdd2226b31b549812c Mon Sep 17 00:00:00 2001 From: vasu Date: Fri, 23 Aug 2024 19:59:08 +0530 Subject: [PATCH] emit wasm files in same dir --- src/ast/binary_encoder.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ast/binary_encoder.ml b/src/ast/binary_encoder.ml index c445c3520..e15f83ec7 100644 --- a/src/ast/binary_encoder.ml +++ b/src/ast/binary_encoder.ml @@ -763,7 +763,8 @@ let write_file filename content = let _dir, filename = Fpath.split_base filename in let filename, _ext = Fpath.split_ext filename in let filename = Fpath.add_ext ".wasm" filename in - let filename = Fpath.to_string filename in + let fullpath = Fpath.add_seg _dir (Fpath.to_string filename) in + let filename = Fpath.to_string fullpath in let oc = Out_channel.open_bin filename in Out_channel.output_string oc content; Out_channel.close oc