Skip to content

Commit e145907

Browse files
authored
purego: clean up some code (ebitengine#123)
1 parent b4a1f66 commit e145907

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

dlfcn_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,8 @@ func buildSharedLib(compilerEnv, libFile string, sources ...string) error {
129129
// macOS arm64 can run amd64 tests through Rossetta.
130130
// Build the shared library based on the GOARCH and not
131131
// the default behavior of the compiler.
132-
var archFlag, arch string
133132
if runtime.GOOS == "darwin" {
134-
archFlag = "-arch"
133+
var arch string
135134
switch runtime.GOARCH {
136135
case "arm64":
137136
arch = "arm64"
@@ -140,7 +139,7 @@ func buildSharedLib(compilerEnv, libFile string, sources ...string) error {
140139
default:
141140
return fmt.Errorf("unknown macOS architecture %s", runtime.GOARCH)
142141
}
143-
args = append(args, archFlag, arch)
142+
args = append(args, "-arch", arch)
144143
}
145144
cmd := exec.Command(compiler, append(args, sources...)...)
146145
if out, err := cmd.CombinedOutput(); err != nil {

0 commit comments

Comments
 (0)