scala-native / scala-native-bindgen

Scala Native Binding Generator

Home Page:https://scala-native.github.io/scala-native-bindgen/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Configure CMake to build statically linked binaries

jonas opened this issue · comments

In order to make it easy to generate bindings, users should be able to automatically download the binary from the GitHub release page or via an sbt plugin.

Currently executable has following dependencies:

$ ldd scala-native-bindgen
        linux-vdso.so.1 =>  (0x00007ffec3bcb000)
        libLLVM-4.0.so.1 => /usr/lib/llvm-4.0/lib/libLLVM-4.0.so.1 (0x00007f8f16849000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f8f164c3000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8f162ac000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8f15ecc000)
        libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f8f15cc4000)
        libedit.so.2 => /usr/lib/x86_64-linux-gnu/libedit.so.2 (0x00007f8f15a8d000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8f15889000)
        libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f8f15660000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8f15441000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f8f15224000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8f14ece000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f8f1aae3000)

I found this PR which uses llvm-config to resolve libraries: https://github.com/ponylang/ponyc/pull/2425/files