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:
cat
2026-08-25 14:00:42 +09:00
parent 7ee5d5368d
commit ac7abbbe3f
16 changed files with 123 additions and 94 deletions
+3 -4
View File
@@ -28,7 +28,6 @@ var (
)
func TestMain(m *testing.M) {
rosa.Native().DropCaches("", rosa.OptLLVMNoLTO)
container.TryArgv0(nil)
code := m.Run()
@@ -79,8 +78,8 @@ func TestCureAll(t *testing.T) {
cache := getCache(t)
t.Parallel()
for _, p := range rosa.Native().CollectAll() {
_, a := rosa.Native().Std().MustLoad(p)
for _, p := range rosa.CollectAll() {
_, a := rosa.MustLoad(p)
t.Run(p.String(), func(t *testing.T) {
t.Parallel()
@@ -94,7 +93,7 @@ func TestCureAll(t *testing.T) {
}
func BenchmarkStage3(b *testing.B) {
t := rosa.Native().Clone().Std()
t := rosa.New().Std()
llvm := rosa.H("llvm")
for b.Loop() {