Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

Porting

Zhang edited this page Dec 12, 2018 · 1 revision

It's entirely possible to port Hikari to any other compiler that uses LLVM as its backend. Including but not limited to:

  • Apple's fork of LLVM used in Xcode
  • Android NDK
  • Swift

Hikari is designed to be as self-contained as possible. Main steps of porting being:

  • Copy include/llvm/Transforms/Obfuscation and lib/Transforms/Obfuscation to your language of choice's corresponding folder.

  • Adjust

    • lib/llvm/Transforms/IPO/LLVMBuild.txt
    • lib/llvm/Transforms/IPO/CMakeLists.txt
    • lib/llvm/Transforms/LLVMBuild.txt
    • lib/llvm/Transforms/CMakeLists.txt
    • lib/llvm/Transforms/IPO/PassManagerBuilder.cpp
    • include/llvm/InitializePasses.h
    • include/llvm/LinkAllPasses.h
  • If you are using Hikari in other LLVM tools like opt,edit corresponding files as well. See Hikari's opt.cpp as example

  • Compile the modified toolchain normally