bazel_cc_fix

command
v0.0.0-...-8d377ce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

bazel_cc_fix rewrites include directives in C and C++ code. It rewrites all includes in the target workspace to be workspace-relative and additionally supports rewriting includes via a prototxt-based spec file to for example fix up includes for external libraries. The rewritten code can then be used in Bazel intra- and inter-workspace without dealing with any copts or include- related attributes. To know where an include would resolve to it expects a compilation database (see https://clang.llvm.org/docs/JSONCompilationDatabase.html) as an input. It looks at all files in that database and their transitive dependencies and rewrites all of them according to the include paths specified in the compilation command from the database. The compilation database itself is either generated by the original build system or by using intercept-build, which intercepts calls to the compiler and records them into a compilation database.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL