compilation

package
v0.35.3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Directory string   `json:"directory"`
	Command   string   `json:"command,omitempty"`
	Arguments []string `json:"arguments,omitempty"`
	File      string   `json:"file"`
}

Command keeps track of a single run of a compile command

type Database

type Database struct {
	// contains filtered or unexported fields
}

Database keeps track of all the compile commands run by the builder

func LoadDatabase

func LoadDatabase(file *paths.Path) (*Database, error)

LoadDatabase reads a compilation database from a file

func NewDatabase

func NewDatabase(filename *paths.Path) *Database

NewDatabase creates an empty CompilationDatabase

func (*Database) Add

func (db *Database) Add(target *paths.Path, command *executils.Process)

Add adds a new CompilationDatabase entry

func (*Database) SaveToFile

func (db *Database) SaveToFile()

SaveToFile save the CompilationDatabase to file as a clangd-compatible compile_commands.json, see https://clang.llvm.org/docs/JSONCompilationDatabase.html

Jump to

Keyboard shortcuts

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