mirror of https://github.com/golang/go.git
[dev.boringcrypto] cmd/link: allow internal linking for crypto/internal/boring
Change-Id: I5b122ad23f75296dab8cec89a4e50dcca7fa9b3f Reviewed-on: https://go-review.googlesource.com/57944 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
991652dcf0
commit
d1351fbc31
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright 2015 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 main_test
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestBoringInternalLink(t *testing.T) {
|
||||
tg := testgo(t)
|
||||
defer tg.cleanup()
|
||||
tg.parallel()
|
||||
tg.tempFile("main.go", `package main
|
||||
import "crypto/sha1"
|
||||
func main() {
|
||||
sha1.New()
|
||||
}`)
|
||||
tg.run("build", "-ldflags=-w -extld=false", tg.path("main.go"))
|
||||
tg.run("build", "-ldflags=-extld=false", tg.path("main.go"))
|
||||
}
|
||||
|
|
@ -856,6 +856,7 @@ var hostobj []Hostobj
|
|||
// These packages can use internal linking mode.
|
||||
// Others trigger external mode.
|
||||
var internalpkg = []string{
|
||||
"crypto/internal/boring",
|
||||
"crypto/x509",
|
||||
"net",
|
||||
"os/user",
|
||||
|
|
|
|||
Loading…
Reference in New Issue