@@ -127,7 +127,7 @@ func runBuild(mode bind.BuildMode, cfg *BuildCfg) error {
127
127
cmd = exec .Command (cfg .VM , "build.py" )
128
128
cmd .Run () // will fail, we don't care about errors
129
129
130
- args := []string {"build" , "-buildmode=c-shared" , "-o" , buildname + libExt , "." }
130
+ args := []string {"build" , "-mod=mod" , "- buildmode=c-shared" , "-o" , buildname + libExt , "." }
131
131
fmt .Printf ("go %v\n " , strings .Join (args , " " ))
132
132
cmd = exec .Command ("go" , args ... )
133
133
cmdout , err = cmd .CombinedOutput ()
@@ -147,7 +147,7 @@ func runBuild(mode bind.BuildMode, cfg *BuildCfg) error {
147
147
err = os .Remove (cfg .Name + "_go" + libExt )
148
148
149
149
fmt .Printf ("go build -o py%s\n " , cfg .Name )
150
- cmd = exec .Command ("go" , "build" , "-o" , "py" + cfg .Name )
150
+ cmd = exec .Command ("go" , "build" , "-mod=mod" , "- o" , "py" + cfg .Name )
151
151
cmdout , err = cmd .CombinedOutput ()
152
152
if err != nil {
153
153
fmt .Printf ("cmd had error: %v output:\n %v\n " , err , string (cmdout ))
@@ -167,7 +167,7 @@ func runBuild(mode bind.BuildMode, cfg *BuildCfg) error {
167
167
168
168
// build the go shared library upfront to generate the header
169
169
// needed by our generated cpython code
170
- args := []string {"build" , "-buildmode=c-shared" }
170
+ args := []string {"build" , "-mod=mod" , "- buildmode=c-shared" }
171
171
if ! cfg .Symbols {
172
172
// These flags will omit the various symbol tables, thereby
173
173
// reducing the final size of the binary. From https://golang.org/cmd/link/
0 commit comments