]> Cypherpunks repositories - gostls13.git/commitdiff
internal/goexperiment: add a new experiment to gate DWARF version 5
authorThan McIntosh <thanm@golang.org>
Fri, 18 Oct 2024 16:10:44 +0000 (12:10 -0400)
committerThan McIntosh <thanm@golang.org>
Sat, 22 Feb 2025 21:26:47 +0000 (13:26 -0800)
Add new experiment to enable generation of DWARF version 5 in
the compiler and linker.

Updates #26379.

Change-Id: I5e686a5e66d13b01e8cc8cd7c04f6fffd90d597b
Reviewed-on: https://go-review.googlesource.com/c/go/+/633877
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/internal/goexperiment/exp_dwarf5_off.go [new file with mode: 0644]
src/internal/goexperiment/exp_dwarf5_on.go [new file with mode: 0644]
src/internal/goexperiment/flags.go

diff --git a/src/internal/goexperiment/exp_dwarf5_off.go b/src/internal/goexperiment/exp_dwarf5_off.go
new file mode 100644 (file)
index 0000000..b89dd9f
--- /dev/null
@@ -0,0 +1,8 @@
+// Code generated by mkconsts.go. DO NOT EDIT.
+
+//go:build !goexperiment.dwarf5
+
+package goexperiment
+
+const Dwarf5 = false
+const Dwarf5Int = 0
diff --git a/src/internal/goexperiment/exp_dwarf5_on.go b/src/internal/goexperiment/exp_dwarf5_on.go
new file mode 100644 (file)
index 0000000..02b28d7
--- /dev/null
@@ -0,0 +1,8 @@
+// Code generated by mkconsts.go. DO NOT EDIT.
+
+//go:build goexperiment.dwarf5
+
+package goexperiment
+
+const Dwarf5 = true
+const Dwarf5Int = 1
index dff5255e00099230791fe49f5a02ee40b6fd5163..7ba0b7c50f9d4e19a271f446ca361103a58a17a2 100644 (file)
@@ -124,4 +124,7 @@ type Flags struct {
 
        // Synctest enables the testing/synctest package.
        Synctest bool
+
+       // Dwarf5 enables DWARF version 5 debug info generation.
+       Dwarf5 bool
 }