open-obfuscator / o-mvll

:electron: O-MVLL is a LLVM-based obfuscator for native code (Android & iOS)
https://obfuscator.re/omvll
Apache License 2.0
574 stars 62 forks source link

Support Swift code #9

Open annidy opened 1 year ago

annidy commented 1 year ago

Hi, romainthomas.

I test o-mvll on iOS project, it dosen't process swift file. any plan to support it?

marcobrador commented 4 months ago

Hi @annidy,

Unfortunately, the Swift compiler does not support plug-ins (even though it's based on LLVM). If it did, theoretically o-MVLL should work out of the box to obfuscate Swift code.

We've created a PR to Apple's Swift compiler to add support for plug-ins (https://github.com/apple/swift/pull/68985), but meanwhile it has not been merged. If you want to express support for the PR to get some visibility, it'd be nice.

Thanks, Marc

thekief commented 3 months ago

Thanks for creating that PR at the repo. I looked into this topic previously and asked them to link the libLLVM in general, as it would also likely shave off quite some size in addition to providing all needed symbols separately.

One last remark: While trying a similar setup a bit more than a year ago, I noticed that I seemed to have some special use cases that required additional libraries of the LLVM infrastructure. Apple/Swift developers are quite restrictive in what they link with the library/applications they build. Did you verify that your plugin properly applies?