mirror of
https://git.sr.ht/~eliasnaur/gio-cmd
synced 2026-07-01 07:35:37 +00:00
gogio: set gioui.org/app.ID in addition to the log package's appID
app.ID is documented to be set by the gogio tool, but never was. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -97,6 +97,9 @@ func getLdFlags(appID string) string {
|
||||
ldflags = append(ldflags, strings.Split(extra, " ")...)
|
||||
}
|
||||
// Pass appID along, to be used for logging on platforms like Android.
|
||||
ldflags = append(ldflags, fmt.Sprintf("-X gioui.org/app.ID=%s", appID))
|
||||
// Support earlier Gio versions that had a separate app id recorded.
|
||||
// TODO: delete this in the future.
|
||||
ldflags = append(ldflags, fmt.Sprintf("-X gioui.org/app/internal/log.appID=%s", appID))
|
||||
// Pass along all remaining arguments to the app.
|
||||
if appArgs := flag.Args()[1:]; len(appArgs) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user