Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
llvm-strip
with support for our cross-compilation targets
When stripping was introduced, it used the system `strip` binary from GNU which isn't usually built to support cross-compilation. On my system I am greeted with the following error when `strip` runs: strip: Unable to recognise the format of the input file 'xxx/libevolve_android.so' But obviously no-one checks process status codes -_-, so this command "silently" continues without modifying the library. That should have left us with a functional yet fat/unstripped library. When this feature was developed the same error message (and unstripped library) was likely seen, resulting in a search for how to make the format recognizable and ultimately having `--target=elf64-little` with `// I'm told this should always be valid for Android, so use this as the target` above it. This is not a complete target and lacks the machine and operating system, resulting in an invalid library that won't run on Android. It was removed in hopes of getting a valid binary, but there is supposedly still an issue with loading the "unstripped?" library (besides it not actually being stripped). Just like all other compiler tools and linkers in `xbuild` use `strip` from LLVM which has cross-compilation support (we already relied on that when the `.so` was first compiled and linked...). This infers the right target from the file and automatically strips everything (i.e. `--strip-all` is superfluous).
- Loading branch information