| 1 |
// Copyright 2015 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 |
|
| 5 |
//go:build boringcrypto |
| 6 |
|
| 7 |
package main_test |
| 8 |
|
| 9 |
import "testing" |
| 10 |
|
| 11 |
func TestBoringInternalLink(t *testing.T) { |
| 12 |
tg := testgo(t) |
| 13 |
defer tg.cleanup() |
| 14 |
tg.parallel() |
| 15 |
tg.tempFile("main.go", `package main |
| 16 |
import "crypto/sha1" |
| 17 |
func main() { |
| 18 |
sha1.New() |
| 19 |
}`) |
| 20 |
tg.run("build", "-ldflags=-w -extld=false", tg.path("main.go")) |
| 21 |
tg.run("build", "-ldflags=-extld=false", tg.path("main.go")) |
| 22 |
} |