What version of LLVM does Smack support? Since Emscripten uses tip-of-tree
LLVM, my guess is that the LLVM IR you're getting is too new for Smack to
read. It's hard to say from just that error message, though.

On Tue, Nov 3, 2020 at 4:36 PM Yugesh Kothari <[email protected]>
wrote:

> Hi,
>
> I am trying to look for a way to compile C/C++ source written with
> emsripten headers to LLVM IR (.ll or .bc) and then subsequently use smack (
> https://github.com/smackers/smack) to get it to boogie. I use the command
> :
>
> emsdk/upstream/bin/clang++ --target=wasm64 `em++ --cflags` -emit-llvm -S
> <file>.cpp -o <file>.ll
>
> which runs. But then when I try to use smack I get this error:
> "Exception: Problem reading input bitcode/IR: Invalid record".
>
> I run into the same problem if I try to compile down the above llvm to an
> executable using llc.
>
> I suspect this has something to do with how I originally compiled my C++
> source. Can someone suggest what is the "right" way to get LLVM IR and
> .js+.wasm instead of just the latter?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/003bfb97-7658-4291-93b0-46f8ec3cd03cn%40googlegroups.com
> <https://groups.google.com/d/msgid/emscripten-discuss/003bfb97-7658-4291-93b0-46f8ec3cd03cn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAJZD_EW%2BypLAJ7T23TB_gbNaZQUFJ34hS2hBH-3%2BRDdFJhLOaQ%40mail.gmail.com.

Reply via email to