summaryrefslogtreecommitdiff
path: root/src/binary-reader-linker.cc
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2017-03-07 07:33:23 -0800
committerGitHub <noreply@github.com>2017-03-07 07:33:23 -0800
commit75c0870ca1371f8fc421749f3b826c51eb971105 (patch)
treeed93ce2818e9eb8b4dc8c6533b67a9799f16a3a9 /src/binary-reader-linker.cc
parentd155a0e4374f9e1f15bcb06aa5d10125efc28829 (diff)
downloadwabt-75c0870ca1371f8fc421749f3b826c51eb971105.tar.gz
wabt-75c0870ca1371f8fc421749f3b826c51eb971105.tar.bz2
wabt-75c0870ca1371f8fc421749f3b826c51eb971105.zip
Add --debug flag to wasmdump and wasm-link (#338)
Enable logging in the binary reader when the --debug flag is passed to wasmdump and wasm-link
Diffstat (limited to 'src/binary-reader-linker.cc')
-rw-r--r--src/binary-reader-linker.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/binary-reader-linker.cc b/src/binary-reader-linker.cc
index b83a2690..c0e3f933 100644
--- a/src/binary-reader-linker.cc
+++ b/src/binary-reader-linker.cc
@@ -289,7 +289,8 @@ static Result on_function_name(uint32_t index,
return Result::Ok;
}
-Result read_binary_linker(LinkerInputBinary* input_info) {
+Result read_binary_linker(LinkerInputBinary* input_info,
+ LinkOptions* options) {
Context context;
WABT_ZERO_MEMORY(context);
context.binary = input_info;
@@ -324,6 +325,7 @@ Result read_binary_linker(LinkerInputBinary* input_info) {
ReadBinaryOptions read_options = WABT_READ_BINARY_OPTIONS_DEFAULT;
read_options.read_debug_names = true;
+ read_options.log_stream = options->log_stream;
return read_binary(input_info->data, input_info->size, &reader, 1,
&read_options);
}