Build with static linking on windows
Categories
(NSS :: Build, defect)
Tracking
(Not tracked)
People
(Reporter: mt, Unassigned)
References
Details
Attachments
(1 file, 1 obsolete file)
The --static flag to build.sh fails on windows for a few minor reasons. Nothing serious, but enough to derail our use of it in neqo.
| Reporter | ||
Updated•6 years ago
|
| Reporter | ||
Comment 1•6 years ago
|
||
I spent a little time trying to get builds running for neqo on windows and this
was a bit of a showstopper. A few build tweaks and it seems to be working fine.
Comment 2•6 years ago
|
||
This change
[ 'OS=="win"', {
'libraries': [
- 'advapi32.lib',
+ '-ladvapi32',
],
causes Firefox builds to emit: lld-link: warning: ignoring unknown argument '-ladvapi32'
Should the change have been limited to cc_use_gnu_ld? Happy to file you a new bug but wanted to confirm the issue first.
| Reporter | ||
Comment 4•6 years ago
|
||
And yet the builds work... Strange. I think that this is right. I'll fix it. Why gyp can't learn to be consistent, add its own -l or .lib as needed, is something that continues to disappoint me in this.
| Reporter | ||
Comment 5•6 years ago
|
||
OK, I have looked into this.
NSS builds depend on this being there. It won't build without it. gyp correctly turns this into the right ninja instructions:
libs = /LIBPATH:"c:\code\dist\Debug\lib" advapi32.lib libnspr4.lib $
libplc4.lib libplds4.lib
However, gecko builds don't rely on this because they already include advapi32.lib on the command line for other reasons. So the error, which appears in the Makefile backend for gyp is hidden. This is what is added to backend.mk:
OS_LIBS += -ladvapi32
Now to look at gyp code to work out what is going on.
| Reporter | ||
Comment 6•6 years ago
|
||
OK, the specific gyp code is here: https://searchfox.org/mozilla-central/rev/9bb55ae4d808fc48afcf93f99da6a685265b86c6/python/mozbuild/mozbuild/frontend/gyp_reader.py#227
And now I need to pause for a bit. I'll open a bug on the gecko build system about this.
Description
•