diff options
Diffstat (limited to 'internal/rosa/all.go')
| -rw-r--r-- | internal/rosa/all.go | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/internal/rosa/all.go b/internal/rosa/all.go index f61ec62f..fb745c0a 100644 --- a/internal/rosa/all.go +++ b/internal/rosa/all.go @@ -322,15 +322,29 @@ var ( } // artifactsOnce is for lazy initialisation of artifacts. artifactsOnce [_toolchainEnd][len(artifactsM)]sync.Once + + // presetOpts globally modifies behaviour of presets. + presetOpts int ) +const ( + // OptSkipCheck skips running all test suites. + OptSkipCheck = 1 << iota + // OptLLVMNoLTO disables LTO in all [LLVM] stages. + OptLLVMNoLTO +) + +// Flags returns the current preset flags +func Flags() int { return presetOpts } + // zero zeros the value pointed to by p. func zero[T any](p *T) { var v T; *p = v } // DropCaches arranges for all cached [pkg.Artifact] to be freed some time after // it returns. Must not be used concurrently with any other function from this // package. -func DropCaches() { +func DropCaches(flags int) { + presetOpts = flags zero(&artifacts) zero(&artifactsOnce) } |
