Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheType ¶
type CacheType int
func (CacheType) MarshalText ¶
func (*CacheType) UnmarshalText ¶
type InvocationMode ¶
type InvocationMode int
const ( UnknownMode InvocationMode = iota CompileMode PreprocessMode AssembleMode LinkMode DepOnlyMode )
type SourceMode ¶
type SourceMode int
SourceMode is the single knob that picks both:
- How the local compile cache derives its key when no precomputed digest is available (i.e. the client-side path; the worker short-circuits via the digest the client sends).
- How the client ships source bytes to the worker when remote dispatch is enabled.
Both behaviors track the same value so a client's local cache and a worker-fronted shared cache (S3, paranoid mode) stay coherent — without that pairing, the two sides would derive different keys for the same translation unit and never see each other's entries.
"preprocessed" → SourceModePreprocessed:
Cache key: hash the bytes produced by the full preprocessor (gcc -E / cl /E). Dispatch (when remote): client preprocesses and ships the resulting bytes inline in CompileRequest. Works on every workload that produces a self-contained translation unit.
"cas" → SourceModeCAS:
Cache key: hash the dep closure (gcc -M / cl /showIncludes). No macro expansion, no preprocessed-text output — much cheaper than the preprocessed-bytes hash. Dispatch (when remote): client builds a content-addressed manifest, probes the worker's compile cache, and (on miss) ships only the missing source blobs via UploadBlobs. Required for workloads where preprocessed output isn't self-contained (e.g. GAS .S files with .incbin). See docs/plan/cas.md.
Maps 1:1 to protocol.SourceMode but lives in `enum` so the config package can hold it without dragging the generated proto into its import graph.
const ( SourceModeUnspecified SourceMode = iota SourceModePreprocessed SourceModeCAS )
func (SourceMode) MarshalText ¶
func (m SourceMode) MarshalText() ([]byte, error)
func (*SourceMode) UnmarshalText ¶
func (m *SourceMode) UnmarshalText(text []byte) error
Click to show internal directories.
Click to hide internal directories.