Permalink
Browse files

[dev.boringcrypto.go1.8] 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>
Reviewed-on: https://go-review.googlesource.com/58071
Reviewed-by: Adam Langley <agl@golang.org>
  • Loading branch information...
rsc committed Aug 23, 2017
1 parent 4aff713 commit d5efcb1ead22bffc7c73ad18b2aa8b96099e328b
Showing with 21 additions and 0 deletions.
  1. +20 −0 src/cmd/go/go_boring_test.go
  2. +1 −0 src/cmd/link/internal/ld/lib.go
@@ -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"))
}
@@ -808,6 +808,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",

0 comments on commit d5efcb1

Please sign in to comment.