1// Copyright 2017 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package runtime
6
7import _ "unsafe" // for go:linkname
8
9//go:linkname boring_runtime_arg0 crypto/internal/boring.runtime_arg0
10func boring_runtime_arg0() string {
11	// On Windows, argslice is not set, and it's too much work to find argv0.
12	if len(argslice) == 0 {
13		return ""
14	}
15	return argslice[0]
16}
17
18//go:linkname fipstls_runtime_arg0 crypto/internal/boring/fipstls.runtime_arg0
19func fipstls_runtime_arg0() string { return boring_runtime_arg0() }
20