HikariObfuscator / Hikari

LLVM Obfuscator
1.93k stars 549 forks source link

About Hikari.xctoolchain #18

Closed xinyangslove closed 6 years ago

xinyangslove commented 6 years ago

I downloaded the project and compiled him, but I didn't find the “Hikari.xctoolchain‘’,How to do?

Naville commented 6 years ago

If you are compiling from sourcecode, use this build script https://gist.github.com/Naville/f1d8ea43ffde61f57497492d599b32fb and run ninja install-xcode-toolchain instead

Naville commented 6 years ago

This is explained in great detail in wiki https://github.com/Naville/Hikari/wiki/Compile-&-Install

xinyangslove commented 6 years ago

Please see the following error: CMake Error: The source directory "/Users/seek/Hikari-master/builds/tools/LLVM" does not exist. Specify --help for usage, or press the help button on the CMake GUI

Naville commented 6 years ago

Assume LLVM Source tree is located at ../LLVM

In this case replace ../LLVM to /Users/seek/Hikari-master/

xinyangslove commented 6 years ago

Thanks, but there hava a small problems.I used the third command to Cross compile to iOS.

seekdeMacBook-Pro:xcode-toolchain seek$ cmake -G "Ninja" -DCMAKE_OSX_ARCHITECTURES="armv7;armv7s;arm64" -DCMAKE_TOOLCHAIN_FILE=/Users/seek/Hikari-master/LLVM/cmake/platforms/iOS.cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_RUNTIME=Off -DLLVM_INCLUDE_TESTS=Off -DLLVM_INCLUDE_EXAMPLES=Off -DLLVM_ENABLE_BACKTRACES=Off -DLLVM_TARGETS_TO_BUILD="ARM;AArch64" -DLLVM_TARGET_ARCH=ARM /Users/seek/Hikari-master/ -- Found libtool - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -- Native target architecture is ARM -- Threads enabled. -- Doxygen disabled. -- Go bindings disabled. -- Found ld64 - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) -- OCaml bindings disabled. -- Could NOT find Python module pygments -- Could NOT find Python module yaml -- LLVM host triple: x86_64-apple-darwin15.6.0 -- LLVM default target triple: x86_64-apple-darwin15.6.0 -- Building with -fPIC -- Constructing LLVMBuild project information -- Targeting ARM -- Targeting AArch64 -- Identified Xcode Version: 8.2.1 -- Configuring done CMake Warning (dev): Policy CMP0068 is not set: RPATH settings on macOS do not affect install_name. Run "cmake --help-policy CMP0068" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

For compatibility with older versions of CMake, the install_name fields for the following targets are still affected by RPATH settings:

LTO

This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done CMake Warning: Manually-specified variables were not used by the project:

CMAKE_TOOLCHAIN_FILE

-- Build files have been written to: /Users/seek/Hikari-master/builds/tools/xcode-toolchain

and then run 'ninja install-xcode-toolchain 'hava a lot of mistakes image

Naville commented 6 years ago

this is used to cross-compile LLVM itself to iOS. You only need the second one

xinyangslove commented 6 years ago

Use the second command and run 'ninja install-xcode-toolchain ' have same mistake.

Naville commented 6 years ago

did you clean up your build folder before running cmake? Cmake caches your previous options

Naville commented 6 years ago

FYI You can also download from releases page, then follow the wiki page "Integrating with Xcode"

xinyangslove commented 6 years ago

There are new problems that make me feel complicated and complicated. Why can't the construction steps be simplified? like 'https://github.com/obfuscator-llvm/obfuscator/wiki/Installation'。

when I delete CMakeCache.txt and the directory CMakeFiles,use the command again to build the 'ninja install-xcode-toolchain'command 'ninja: error: unknown target 'install-xcode-toolchain'

xinyangslove commented 6 years ago

Integrating with Xcode has an error, ExecPath under Hikari.xcspec needs to be '~ /Library/Developer/Tools/Hikari.xctoolchain/usr/bin/clang, but I do not have this file

Naville commented 6 years ago

then go ahead and use ollvm. I couldn't care less. Everything is listed in great detail in wiki and it's not my fault that you are too retarded to read it

Naville commented 6 years ago

Integrating with Xcode has an error, ExecPath under Hikari.xcspec needs to be '~ /Library/Developer/Tools/Hikari.xctoolchain/usr/bin/clang, but I do not have this file

Below is directly quoted from the wiki

Note that this repo contains only the LLVM Core. You need to checkout other components like Clang yourself.See the wiki page SVN Revs

Naville commented 6 years ago

Also, OLLVM is not simplified. It misses critical components like compiler-rt,libcxx and the alike as well. It's not easy to setup