cgo: Add LDFlags support

This commit is contained in:
Lucas Teske
2020-05-20 13:05:25 -03:00
committed by Ayke
parent b9fd6cee6f
commit 726d735ad3
8 changed files with 46 additions and 18 deletions
+7
View File
@@ -21,6 +21,13 @@ package main
#if defined(NOTDEFINED)
#warning flag must not be defined
#endif
// Check Compiler flags
#cgo LDFLAGS: -lc
// This flag is not valid ldflags
#cgo LDFLAGS: -does-not-exists
*/
import "C"
+1
View File
@@ -1,6 +1,7 @@
// CGo errors:
// testdata/flags.go:5:7: invalid #cgo line: NOFLAGS
// testdata/flags.go:8:13: invalid flag: -fdoes-not-exist
// testdata/flags.go:29:14: invalid flag: -does-not-exists
package main