mirror of
https://github.com/golang/go
synced 2024-11-17 06:04:47 -07:00
cmd/cgo/internal/test: don't pass -lm on darwin
On darwin, -lm is not necessary as the math functions are included in libSystem. Passing -lm multiple times results in linker warnings. Don't pass it on darwin. For #61229. Change-Id: I72d8dab1f0eead68cbeb176ac97b8ed1a0cfddab Reviewed-on: https://go-review.googlesource.com/c/go/+/508697 Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
parent
f55e7e104b
commit
333c80694c
@ -1,7 +1,7 @@
|
||||
package cgotest
|
||||
|
||||
/*
|
||||
#cgo LDFLAGS: -lm
|
||||
#cgo !darwin LDFLAGS: -lm
|
||||
#include <math.h>
|
||||
*/
|
||||
import "C"
|
||||
|
@ -1,7 +1,7 @@
|
||||
package issue8756
|
||||
|
||||
/*
|
||||
#cgo LDFLAGS: -lm
|
||||
#cgo !darwin LDFLAGS: -lm
|
||||
#include <math.h>
|
||||
*/
|
||||
import "C"
|
||||
|
@ -23,7 +23,7 @@ package cgotest
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#cgo LDFLAGS: -lm
|
||||
#cgo !darwin LDFLAGS: -lm
|
||||
|
||||
#ifndef WIN32
|
||||
#include <pthread.h>
|
||||
|
Loading…
Reference in New Issue
Block a user