forked from rosa/hakurei
internal/rosa: read-only access to built-ins
This removes potential footguns caused by mutable builtins without requiring unnecessary clones. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -48,7 +48,7 @@ func litArgs(verbose bool, skipChecks ...string) string {
|
||||
}
|
||||
|
||||
func init() {
|
||||
native.MustRegister("llvm", func(t Toolchain) (*Metadata, pkg.Artifact) {
|
||||
builtin.MustRegister("llvm", func(t Toolchain) (*Metadata, pkg.Artifact) {
|
||||
meta := Metadata{
|
||||
Name: "llvm",
|
||||
Description: "a collection of modular and reusable compiler and toolchain technologies",
|
||||
@@ -168,7 +168,7 @@ func init() {
|
||||
)
|
||||
}
|
||||
|
||||
if t.opts&OptLLVMNoLTO == 0 {
|
||||
if t.opts&OptToolchainLTO != 0 {
|
||||
cache = append(cache, []KV{
|
||||
// very expensive
|
||||
{"LLVM_ENABLE_LTO", "Thin"},
|
||||
|
||||
Reference in New Issue
Block a user