Coder Social home page Coder Social logo

Rust support about symcc HOT 5 OPEN

eurecom-s3 avatar eurecom-s3 commented on June 9, 2024
Rust support

from symcc.

Comments (5)

sebastianpoeplau avatar sebastianpoeplau commented on June 9, 2024 2

We think so too :) There's someone currently looking into it - we'll keep you posted.

from symcc.

sebastianpoeplau avatar sebastianpoeplau commented on June 9, 2024

Thanks for sharing @unseddd! In our initial work, we went for the first approach. While getting SymCC added to upstream LLVM would allow a cleaner solution and make it easier for people to use SymCC in general, a lot of continued effort would be required to keep up with LLVM's pace of development and to provide high-quality support for all its targets.

I'm trying to find the time to finish the work on Rust support from where the student left off... He was able to include the SymCC pass into the LLVM version that rustc uses, and we determined that we'd need the stage-0 compiler and the stage-1 libraries, as you said. Finally, we'd have to make sure that the new compiler links or compiles SymCC's libSymRuntime into binaries.

from symcc.

sebastianpoeplau avatar sebastianpoeplau commented on June 9, 2024

I can't guarantee how long-term I can provide development and support (future being uncertain), but I want to get more involved with LLVM development. Willing to experiment with adding a symbolize pass in-tree. llvm/lib/Transforms/Instrumentation seems like a good place for smth like a SymbolizePass.cpp to live, what do you think?

Yes, I agree. And for the custom build of rustc and its LLVM I think it's easiest to compile SymCC in-tree anyway, so that we avoid the challenges around locating and loading libSymbolize.so. We're building a custom version of the compiler already, so we can as well patch the SymCC pass in.

I had some success with building SymCC in Rust's LLVM tree as well, but haven't figured out how to get the codegen backend to load the libSymbolize.so library (rustc_codegen_llvm looks for static .a libs). Still working on it, though.

Maybe it's easiest to move SymCC's compiler directory into the LLVM tree. The LLVM docs suggest that the changes needed in the build system should be relatively minor.

I have some spare cycles to throw at the problem, so I'm willing to help out. Will look into how to link libSymRuntime once I get a working symbolized rustc build. Does libSymRuntime need to be linked in the rustc build, or only for binaries being tested?

That's great! As for libSymRuntime, it's only needed to execute instrumented code, not to build it. So while rustc needs to build the runtime into the executables that it creates, I don't think it will itself need to be built against it.

from symcc.

sebastianpoeplau avatar sebastianpoeplau commented on June 9, 2024

Wow, that's really nice! Great progress :)

from symcc.

unseddd avatar unseddd commented on June 9, 2024

Tried moving SymCC in-tree in LLVM, and using the new pass manager. Running into a linking issue, but will keep experimenting.

(Apologies for deleting previous comments, went overzealous with housekeeping)

from symcc.

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.