Code Monkey home page Code Monkey logo

cppless-clang's People

Contributors

akyrtzi avatar arsenm avatar chandlerc avatar chapuni avatar d0k avatar ddunbar avatar douggregor avatar dwblaikie avatar echristo avatar eefriedman avatar ericwf avatar espindola avatar isanbard avatar jdevlieghere avatar labath avatar lattner avatar lebedevri avatar lhames avatar maskray avatar nico avatar resistor avatar rksimon avatar rnk avatar rotateright avatar rui314 avatar stoklund avatar tkremenek avatar tobiasgrosser avatar topperc avatar zygoloid avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cppless-clang's Issues

Fix LTO when using alt-entry

When using clang LTO in the case that cpp files are compiled clang will proudce LLVM bitcode files. This doesn't work correctly with the alt-entry point feature yet, the meta json file isn't produced in all cases

Clean up files of last invocation in cppless-ld & backend-util

Reproduction:

  • compile a compilation unit with 3 alternative entry points
  • three binaries will appear
  • remove 2 alternative entry points and compile again
  • the 2 binaries from the previous compilation still exist

We could simply search for files with the correct naming scheme and remove these

Implement __attribute((entry))

The EntryAttr should be allowed to exist on static method declarations and function declarations with the signature int (int argc, char *argv[]), making that method an additional entry point to the program. The frontend should decide whether to honor the EntryAttr declarations based on a compiler flag -fmultiple-entry-points, if that flag is not set the __attribute((entry)) declarations should be ignored.

Details:

  • declarations marked with __attribute((entry)) will have the same constraints as a normal main function, thus they are not allowed to be recursive
  • declarations annotated with __attribute((entry)) need to have the signature int (int, char **) even when -fmultiple-entry-points is not set, the flag only controls the code generation behavior.
  • templated entry declarations are replaced eagerly, thus a templated instantiation of a surrounding class causes the entry declaration itself to be emitted.

Implementation details:

  • Can be handled similarly to the existing UsedAttr
  • We have to emit some metadata which can be used by the linker to emit separate binaries

Lambda Serialization

The data a lambda captures has to be serialized so that it can be executed in a serverless function. The compiler should provide a generic interface which can be used to synthesize serialization and deserialization functions at compile-time in user-space.

Open questions?

  • How should generic lambdas be handled - does it just work?

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.