add a owi llvm or owi bc command#967
Conversation
|
Hi ! Thanks for the contribution. I think you need to run |
| @@ -0,0 +1,6 @@ | |||
| target triple = "wasm32-unknown-unknown" | |||
There was a problem hiding this comment.
Is this really necessary? I think it'd be better if we could omit this from the llvm file and simply pass it inside Owi when calling llvm. It will allow people to use it on any llvm file rather than on file that were made specifically for Wasm (but I don't know if it's possible as I'm not familiar with llvm).
There was a problem hiding this comment.
Yes, I agree with you and I can remove it.
The target is already enforced by the option -march=wasm32, in the command llc , in cmd_llvm.ml file.
We can eventually add the target triple option in the llc command with the option -mtriple=wasm32-unknown-unknown if necessary.
There was a problem hiding this comment.
Yes, I think it would be much better!
There was a problem hiding this comment.
It still work if we remove the line though.
Moreover, I didn't test my code with any other env/distro, so I don't known if the compilation may fail.
|
I have made the corrections you suggested to me, but the Nix CI seems still fail, even after |
|
Yes, this time it seems you are using an old version of cmdliner and the output is different which makes the cram tests fail. Which version of cmdliner are you using? Could you try to use a more recent one? (If you use opam, it may be that our opam file is not updated to use the latest cmdliner version, in which case, you could fix it along the way by changing |
|
Yes I was using cmdliner 1.3.0, I updated it manually to 2.1.1 version. I also updated the dune-project file. |
|
Thanks! You need to run |
|
Actually, when I'm running I seems like there is a problem with my env (missing deps or other...). Maybe I can show you through Zulip? |
|
Looks all good now, thanks for the contribution! :) |
What does this PR do ?
Add a command to compile .ll and .bc files.
Add llvm command cramtests.
Add llvm command docs.
Not a native symbolic execution for LLVM -> convert files into wasm and then use Owi Symbolic Execution.
Here is the pipeline to compile the LLVM file (in the order).
llvm-as: .ll file -> .bc filellc: bitcode compilation -> .o wasm fileswasm-ld: link .o files to produce final wasm fileWhy this change needed ?
Add a new command to facilitate .bc and .ll files.
How to test ?
The following cramtest are provided to validate the feature :
./test/cram/llvm/empty.t./test/cram/llvm/not_exists.t./test/cram/llvm/simple.t./test/cram/llvm/trap_div_zero.t./test/cram/llvm/unsupported_ext.tTo test :
dune runtest {test}Issue
Closes #300
N-B: This contribution is part of work carried out as a student at Université Paris-Cité.
Apologies if this is inappropriate or if the contribution does not meet the project's standards, any feedback is welcome.