Fix ldflags in GOFLAGS not being respected.#17
Conversation
|
Sorry for this not getting a review. I must admit that I don't quite understand what the code is trying to do or what it fixes but I hope Cedric might understand the inner workings of this tool better. |
|
I'll try to restate the problem in case it helps. The issue is this code: This CHANGES the environment - which is obviously global. If this code ever runs a second time (which it does) then it doesn't work because the environment was changed by the first run. |
@williambrode If it helps, this is the command that eventually got it compiled successfully, but it the values don't show up in the windows app. |
|
Like Jacob I think this makes sense, but wonder if @Bluebugs is able to comment as this is an area he has battled before. |
|
It seems like #70 does fix this issue but with a broader solution, let's go with that one. |
extractLdflagsFromGoFlags()was not reentrant, but we were calling it a second time when building on windows. PackageWindows does another build and the second one saw an environment with the ldflags stripped out.This doesn't work before the change (version was not set) but it work after this change.