Skip to content

Commit 562a6c1

Browse files
committed
fix needsAssembly
1 parent 65cd8e1 commit 562a6c1

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

cmd/mkcgo/generate.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -684,15 +684,7 @@ func getFrameworkPath(dylib mkcgo.Framework) string {
684684

685685
// needsAssembly checks if assembly trampolines are needed for nocgo mode.
686686
func needsAssembly(src *mkcgo.Source) bool {
687-
if dynload() {
688-
return false
689-
}
690-
for _, fn := range src.Funcs {
691-
if !fnCalledFromGo(fn) {
692-
continue
693-
}
694-
}
695-
return false
687+
return dynamic()
696688
}
697689

698690
// generateNocgoGo generates Go source file for nocgo mode from src.

internal/ossl/zdl.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Code generated by mkcgo. DO NOT EDIT.
22

3-
//go:build !cgo
3+
//go:build !cgo && (unix)
44

55
#include "textflag.h"
66

0 commit comments

Comments
 (0)