aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorMichael Matloob <matloob@golang.org>2025-01-16 15:44:55 -0500
committerMichael Matloob <matloob@golang.org>2025-03-11 07:51:38 -0700
commit73fea035bf1e4e68ef14995a389d4fd8df5c6a34 (patch)
treef270eb7b35335d14ec61fb045eb645825abd41e2 /src/runtime
parenta588c6fba6d411245d72b9e071eedc3b4d00a0c8 (diff)
downloadgo-73fea035bf1e4e68ef14995a389d4fd8df5c6a34.tar.xz
cmd/go: allow symlinks of non-directory files in embed
We previously disallowed all non-regular files being embedded. This CL relaxes the restriction a little: if the GODEBUG embedfollowsymlinks=1 is set, we allow the leaf files being embedded (not the directories containing them) to be symlinks. The files pointed to by the symlinks must still be regular files. This will be used when a Bazel build action executing the Go command is running in a symlink-based sandbox. It's not something we want to enable in general for now, so it's behind a GODEBUG. Fixes #59924 Change-Id: I895be14c12de55b7d1b663d81bdda1df37d54804 Reviewed-on: https://go-review.googlesource.com/c/go/+/643215 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/metrics/doc.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runtime/metrics/doc.go b/src/runtime/metrics/doc.go
index 563ddf4c95..0d35314e06 100644
--- a/src/runtime/metrics/doc.go
+++ b/src/runtime/metrics/doc.go
@@ -234,6 +234,11 @@ Below is the full list of supported metrics, ordered lexicographically.
The number of non-default behaviors executed by the time package
due to a non-default GODEBUG=asynctimerchan=... setting.
+ /godebug/non-default-behavior/embedfollowsymlinks:events
+ The number of non-default behaviors executed by the cmd/go
+ package due to a non-default GODEBUG=embedfollowsymlinks=...
+ setting.
+
/godebug/non-default-behavior/execerrdot:events
The number of non-default behaviors executed by the os/exec
package due to a non-default GODEBUG=execerrdot=... setting.