mirror of
https://github.com/golang/go
synced 2024-11-06 13:36:12 -07:00
185e6094fd
This is a git merge of master into dev.boringcrypto. The branch was previously based on release-branch.go1.9, so there are a handful of spurious conflicts that would also arise if trying to merge master into release-branch.go1.9 (which we never do). Those have all been resolved by taking the original file from master, discarding any Go 1.9-specific edits. all.bash passes on darwin/amd64, which is to say without actually using BoringCrypto. Go 1.10-related fixes to BoringCrypto itself will be in a followup CL. This CL is just the merge. Change-Id: I4c97711fec0fb86761913dcde28d25c001246c35
20 lines
606 B
Go
20 lines
606 B
Go
// Copyright 2017 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package runtime
|
|
|
|
import _ "unsafe" // for go:linkname
|
|
|
|
//go:linkname boring_runtime_arg0 crypto/internal/boring.runtime_arg0
|
|
func boring_runtime_arg0() string {
|
|
// On Windows, argslice is not set, and it's too much work to find argv0.
|
|
if len(argslice) == 0 {
|
|
return ""
|
|
}
|
|
return argslice[0]
|
|
}
|
|
|
|
//go:linkname fipstls_runtime_arg0 crypto/internal/boring/fipstls.runtime_arg0
|
|
func fipstls_runtime_arg0() string { return boring_runtime_arg0() }
|