-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include missing functions from llvm's compiler-rt into Jitllvm #1153
Conversation
Hi @aguinet ! |
I've squash your commit into mine. The main remaining issue is how to have distutils build a shared library in a portable way. We might also fix this by launching command line by hand to generate this .so/.dll ... |
157d7f0
to
fde9b81
Compare
Can you rebase on master @aguinet ? I fixed the tipo erros in codespell to pass travis tests. |
Done! |
Hope the Travis Gods will be on our side. |
The Travis Gods are pleased with your sacrifice. |
I am pushing a dummy PR to see if the windows 32 bit tests are due to this PR or if it's a coincidence. |
So I will squash these commits into one! About Windows 32, I will try on my local VM, but it seems to be a bigger issue. There is also this https://ci.appveyor.com/project/cea-sec/miasm/builds/33068672/job/701prnol8kpicw4d, with an issue on dse_crackme.py, that can't delete a temporary file. Maybe a race between two tests? |
There is an issue on dse which appears at runtime randomly, but in most cases, the build is ok on appveyor. But it seems your PR broke the test at build time, right? |
Yes the issue on win 32 bits is at build time. I seem to be able to reproduce this locally. I'm looking into it. |
So the issue under 32 bits is that clang still builds 64 bits binaries. Indeed, the choice is normally made with the VS environment that is choosen. I will try and fix that properly :) |
Other problem is that uint128_t does not exist for Windows 32-bit, even with Clang. IIRC it is the same for Linux 32 bits. I guess we have to disable the mn_div test for 32-bit builds! |
95ad2c7
to
eb3de69
Compare
Fixed by forcing the compilation with clang only for 64-bit Windows systems. I also disabled the mn_div.py test if we are not running on a 64-bit system. |
All green @serpilliere ! |
Under Windows, we also need to compile these with clang (because MSVCRT doesn't seem to have proper uint128_t support), so automatically check if clang is installed (through the registry) and force distutils to use it (with a not so nice hack). Last but not least, this only works for 64 bit systems, so disable the mn_div test if this is not the case.
Thanks a lot for the fix @aguinet ! |
Include missing functions from llvm's compiler-rt into Jitllvm
It's still a hack to fix the "divsion" problem with LLVM, but seems to work under Linux! (haven't tried under Windows yet but hopefully it works)