File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 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 {
235235 if include , exists := os .LookupEnv ("GOPY_INCLUDE" ); exists {
236236 cflags = append (cflags , "-I" + filepath .ToSlash (include ))
237237 }
238+ if oldcflags , exists := os .LookupEnv ("CGO_CFLAGS" ); exists {
239+ cflags = append (cflags , oldcflags )
240+ }
238241 var ldflags []string
239242 if cfg .DynamicLinking {
240243 ldflags = strings .Fields (strings .TrimSpace (pycfg .LdDynamicFlags ))
@@ -250,6 +253,9 @@ func runBuild(mode bind.BuildMode, cfg *BuildCfg) error {
250253 if libname , exists := os .LookupEnv ("GOPY_PYLIB" ); exists {
251254 ldflags = append (ldflags , "-l" + filepath .ToSlash (libname ))
252255 }
256+ if oldldflags , exists := os .LookupEnv ("CGO_LDFLAGS" ); exists {
257+ ldflags = append (ldflags , oldldflags )
258+ }
253259
254260 removeEmpty := func (src []string ) []string {
255261 o := make ([]string , 0 , len (src ))
You can’t perform that action at this time.
0 commit comments