o2e / OLLVM-9.0.1

OLLVM-9.0.1-NDK-21.3.6528147(ndk-r21d)
Other
130 stars 39 forks source link

ollvm 12 #3

Closed ghost closed 2 years ago

ghost commented 2 years ago

Can you update ollvm to 12? I need to be able to use ollvm on NDK 23 witch support flag c++20

o2e commented 2 years ago

尝试使用这个补丁 https://github.com/o2e/OLLVM-9.0.1/blob/master/add_o-llvm(fixed).patch 或者参考这次提交来升级你的llvm https://github.com/o2e/OLLVM-9.0.1/commit/75992c1d980b2f23e6c92ca994453ce0bbf91743 又或者在github上寻找 我不准备对它升级

ghost commented 2 years ago

can't you do that? i'm not familar with llvm and it's taking a day to build

o2e commented 2 years ago

我没有时间做,也因为懒惰不想去做。适配llvm12不需要熟悉llvm,你只要要参照我的提交进行修改就能完成(因为我也是这样做的 或许你需要Google)。你不必向我”吐槽“困难,因为我没有义务因为你不熟悉或者构建时间过长而帮助你,你应该去学习一些相关的知识然后升级你的硬件设备(2.3 GHz 四核Intel Core i7 只需要30多分钟),然后自己动手完成它。这并不复杂,加油做吧,我的朋友,奥利给!

o2e commented 2 years ago

善用搜索功能 这非常实用 https://github.com/search?o=desc&q=ollvm&s=updated&type=Repositories 我再教你一个方法 对于一个不再维护当却很有用的项目 你可以通过他的fork网络找打其他人维护的新版本 https://github.com/obfuscator-llvm/obfuscator/network

例如这个项目 他还包含llvm13 https://github.com/heroims/obfuscator/tree/llvm-12.x

ghost commented 2 years ago

I can't afford to upgrade, there is no reason since it's working fine. Also Google does not work well, and comes up with weird results these days so i would not like to bother using it much.

I have tried heroims's obfuscator but i'm not getting the required clang executeable files. What should i do to get it compiled?

His page does not have issue open so i can't ask him

o2e commented 2 years ago

这非常简单,你只需要一台包含ubuntu操作系统的计算机,当然,你也可以使用docker安装一个ubuntu。然后你只需要clone下需要的源码,开始操作。

apt install cmake
apt install ninja-build
apt install clang
apt install libz3-dev

git clone xxxxxxxxxxxxxxxxxxxxxxxxxxx.git
cd OLLVM
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ../
make -j8

就这样 你完成了编译

上面是linux使用的 macOS还是和项目介绍那样操作就行

ghost commented 2 years ago

i'm using Windows. Your ollvm 9.0.1 is working perfectly after following the steps correctly, and i have the right clang exe files to replace, I didn't needed linux after all. I tried to follow the same steps on ollvm 12 but the clang exe files are missing, only having most llvm files even though the compiler has succeded

o2e commented 2 years ago

我不清楚llvm12有什么变动,但是按照常理来说tools 文件夹里面应该要包含clang源代码文件,就像9.x一样(https://github.com/heroims/obfuscator/tree/llvm-9.0.1/tools/clang) 我检查了一下heroims的llvm2 似乎不存在clang,你可能,也许需要下载一个合适的clang版本源代码并复制进去(https://github.com/heroims/obfuscator/tree/llvm-12.x/llvm/tools) 当然,这只是我的猜测

ghost commented 2 years ago

I found the clang folder which is in root directory. I moved it to llvm/tools, deleted build and ran the compliation from scratch. Now I got the clang exe files