Giter Site home page Giter Site logo

Static link failure about clang-sys HOT 8 CLOSED

kylemayes avatar kylemayes commented on June 7, 2024
Static link failure

from clang-sys.

Comments (8)

KyleMayes avatar KyleMayes commented on June 7, 2024

Working on a solution.

from clang-sys.

Yamakaky avatar Yamakaky commented on June 7, 2024

Tip: in bindgen, replace the clang-sys version by a path to a local checkout of clang-sys. You can then easily test changes in clang-sys. It would be better to have a dummy test bin, though.

from clang-sys.

Yamakaky avatar Yamakaky commented on June 7, 2024

In fact no, you can simply run cargo test --features static.

from clang-sys.

KyleMayes avatar KyleMayes commented on June 7, 2024

Yeah, that's what I thought.
I'm closer to a solution now, static linking is working with 3.5, 3.6, and 3.7 on Linux.

from clang-sys.

KyleMayes avatar KyleMayes commented on June 7, 2024

I'm stumped, it seems the 3.8 releases neglected to include libclang.a. We may need to disallow static linking in this case. I'm emailing the clang mailing lists to see what this is about.

from clang-sys.

Yamakaky avatar Yamakaky commented on June 7, 2024

ahah ^^

from clang-sys.

KyleMayes avatar KyleMayes commented on June 7, 2024

OK, static linking works on Linux and OS X for clang < 3.8.

I added a LLVM_CONFIG_PATH environment variable for setting the path to an llvm-config executable. This is necessary because llvm-config --libs returns different lists of libraries depending on the version of LLVM llvm-config was compiled for. This means you need to set this to test static linking so you don't get linking errors (Linux, OS X).

from clang-sys.

Yamakaky avatar Yamakaky commented on June 7, 2024

cool!

from clang-sys.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.