GithubHelp home page GithubHelp logo

isabella232 / bazel-stack-vscode-cc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stackb/bazel-stack-vscode-cc

0.0 0.0 0.0 88 KB

C/C++ Support For Bazel Stack VSCode Extension

License: Apache License 2.0

Python 13.73% TypeScript 40.25% Starlark 46.03%

bazel-stack-vscode-cc's Introduction

bazel-stack-vscode-cc

Additional support for rules_cc in conjunction with bazel-stack-vscode

Features

Clang Compilation Database

This extension provides a command Bazel/C++: Generate Compilation Database (bsv.cc.compdb.generate) that produces a file ${workspaceDirectory}/compile_commmands.json that assists with Intellisense for Bazel/C++ repositories.

To setup, edit your workspace settings (search for bsv.cc.compdb.targets) and configure a list of bazel labels for the cc_binary or cc_library targets you'd like to be indexed. The tool will then produce a command set for the transitive closure of those top-level targets.

To configure the bazel executable and/or additional bazel build arguments, use the bsv.bazel.executable and bsv.bazel.buildFlags settings (provided by bazel-stack-vscode).

These can be added to your .vscode/settings.json and checked-in to VCS as follows:

{
    ...
    "bsv.bazel.buildFlags": [
        "--config=custom",
    ],
    "bsv.cc.compdb.targets": [
        "//app/foo:foo_binary",
        "//app/bar:bar_binary",
        "//app/baz:baz_binary",
    ]
}

Works best in conjuction with https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd.

This feature was derived from https://github.com/grailbio/bazel-compilation-database.

bazel-stack-vscode-cc's People

Contributors

pcj 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.