File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,9 @@ func runBuild(mode bind.BuildMode, cfg *BuildCfg) error {
235
235
if include , exists := os .LookupEnv ("GOPY_INCLUDE" ); exists {
236
236
cflags = append (cflags , "-I" + filepath .ToSlash (include ))
237
237
}
238
+ if oldcflags , exists := os .LookupEnv ("CGO_CFLAGS" ); exists {
239
+ cflags = append (cflags , oldcflags )
240
+ }
238
241
var ldflags []string
239
242
if cfg .DynamicLinking {
240
243
ldflags = strings .Fields (strings .TrimSpace (pycfg .LdDynamicFlags ))
@@ -250,6 +253,9 @@ func runBuild(mode bind.BuildMode, cfg *BuildCfg) error {
250
253
if libname , exists := os .LookupEnv ("GOPY_PYLIB" ); exists {
251
254
ldflags = append (ldflags , "-l" + filepath .ToSlash (libname ))
252
255
}
256
+ if oldldflags , exists := os .LookupEnv ("CGO_LDFLAGS" ); exists {
257
+ ldflags = append (ldflags , oldldflags )
258
+ }
253
259
254
260
removeEmpty := func (src []string ) []string {
255
261
o := make ([]string , 0 , len (src ))
You can’t perform that action at this time.
0 commit comments