bluesadi / Pluto

Obfuscator based on LLVM 14.0.6
831 stars 185 forks source link

[MacOS] don't hardcode z3lib.so and build errors #8

Closed nullhook closed 2 years ago

nullhook commented 2 years ago

if you want this to be cross-platform do not hardcode link_libraries("/usr/lib/libz3.so"). Perhaps add a dep requirement in the readme and if/else OS directive?

i have installed z3 via homebrew and it triggers the build: link_libraries("/opt/homebrew/lib/libz3.dylib")

however, I get lots of build warnings and errors half way.

`.../Obfuscation/CryptoUtils.h:68:2: error: "Unknown endianness of the compilation platform, check this header aes_encrypt.h"

error`

SsageParuders commented 2 years ago

For MacBook Pro with M1. Patch CryptoUtils.h just as:https://github.com/obfuscator-llvm/obfuscator/pull/160

image
bluesadi commented 2 years ago

Changed to:

add_llvm_component_library(LLVMObfuscation
  HelloWorld.cpp
  SplitBasicBlock.cpp
  CryptoUtils.cpp
  Utils.cpp
  Flattening.cpp
  BogusControlFlow.cpp
  Substitution.cpp
  GlobalsEncryption.cpp
  VariableSubstitution.cpp
  RandomControlFlow.cpp
  TrapAngr.cpp
  LinearMBAObfuscation.cpp
  MBAUtils.cpp

  DEPENDS
  intrinsics_gen

  LINK_LIBS
  z3

  LINK_COMPONENTS
  Core
  Support
  Analysis
  TransformUtils
)