Git Product home page Git Product logo

clang-libtooling-experiments's Introduction

clang-libtooling-experiments

Experiments developing tools using Clang LibTooling.

Standalone Build

LLVM/CLANG takes forever to build. To expedite development on tools a standalone build is established following docs. This step is carried out by build_standalone_llvm_clang.py1 which loads configurations from llvm-build-config.jsonc2.

The assumed default directory structure is as follows:

<root>
+---llvm
+---clang-libtooling-experiments
|   +---build_standalone_llvm_clang.py
|   \---example
+---build-llvm
+---build-clang
+---llvm-release

Python Setup Helper

The setup_llvm_clang.py module exists to help establish this dependency.

  • py setup_llvm_clang.py -h to see help output
  1. py setup_llvm_clang.py --writeconfig to create the default configuration file: llvm-config.json
    • Change as necessary (desired directories and vcvarsbat)
    • NOTE: this will overwrite llvm-config.json if it exists!
  2. py setup_llvm_clang.py --clone to clone the required LLVM repo (out of tree).
  3. py setup_llvm_clang.py --llvm --clang to compile the dependencies.

NOTE Once LLVM/Clang is compiled the resource should be maintained to mitigate lengthy compile times in the future.

Default Configuration

The default configuration will result in the following hierarchy when py setup_llvm_clang.py --clone --llvm --clang is executed from this directory:

. <root-dir>
/binder (*this*)
    setup_llvm_clang.py
    llvm-config.json (generated by setup_llvm_clang.py)
/llvm           .. cloned github branch (tag)
/build-llvm     .. llvm build directory
/build-clang    .. clang build directory
/llvm-reldbg    .. generated llvm/clang binaries

Footnotes

  1. Python was used to control the build process for ease in cross-platform support.

  2. JSON configuration file is used to avoid hard-coding settings and lengthy command line options.

clang-libtooling-experiments's People

Contributors

jeffrywalker avatar

Watchers

 avatar

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.