Git Product home page Git Product logo

elfs-clang-plugins's People

Contributors

sinelaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

elfs-clang-plugins's Issues

Difficulties setting up build environment

Hello,

I've tried to build this - it looks like a useful tool - but I've had some trouble. On Ubuntu 16.04 despite a successful apt-get install llvm-3.7-dev clang-3.7 libclang-3.7-dev I'm not able to make:-

mtandy@mtandy-desktop:~/Documents/elfs-clang-plugins$ make
g++  `llvm-config-64 --cxxflags` -O2 -g "enums_conversion/enums_conversion.cpp" -o "enums_conversion.o" -c -Wall -Wextra -Wno-unused -Wno-strict-aliasing -Werror
/bin/sh: 1: llvm-config-64: not found
enums_conversion/enums_conversion.cpp:3:51: fatal error: clang/Frontend/FrontendPluginRegistry.h: No such file or directory
compilation terminated.
Makefile:31: recipe for target 'enums_conversion.o' failed
make: *** [enums_conversion.o] Error 1

I can change the makefile to add -I /usr/lib/llvm-3.7/include/ to the g++ command - but that gives me hundreds of errors.

Presumably my environment is misconfigured. Do you think you could provide a travis buildfile or something similar, showing me how it's done?

FrontendPluginRegistry - modify source on the fly

Hi,

I have read your blog and your plugins, and It seems you don't use it. I cannot achieve what I want and maybe you know how to do it.

I am able to create a plugin FrontendPluginRegistry::Add that uses ASTConsumer and Visitor pattern, and modify the source code with Rewriter. The problem is that I cannot modify the source code that is compiled in that phase. I don't know how to affect the compilation itself. I tried with AddBeforeMainAction with no luck.

I only saw an option to overwrite source files, but it will modify the user files and it will need another run to compile the modifications. I just want to modify the files at runtime, in one step. I suppose it will need some sort of "after my plugin is executed, reparse again and run the whole compilation phase again".

I am executing the plugin like this clang++ ${FLAGS} -Xclang -load -Xclang ${path_to_so} -Xclang -add-plugin -Xclang $plugin_name -o $BIN ${FILE}.

The thing is that I need a plugin. I don't want to create an independent tool to do it (like libTooling with a main function).

Regards,
rNoz

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.