diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2020-05-05 12:29:29 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2020-05-05 12:29:29 +0000 |
commit | 77559593f704b95bcbd14776f6dbf63b293b3b7c (patch) | |
tree | 58007f0f966a0290e6c2a415513eeff2f9dd3973 /coreconf | |
parent | 880e1e1521f837149841c7bf5e09a6cc30bffa03 (diff) | |
download | nss-hg-77559593f704b95bcbd14776f6dbf63b293b3b7c.tar.gz |
Bug 290526 Fix gtests build for WIN% targets r=rrelyea
The google_test gtest build doesn't provide any exports for the
shared library on Windows and the gyp build also builds just a
static library. So build gtest and gtestutil libraries as static.
For whatever reason, the Windows linker doesn't find the main
function inside the gtestutil library, if we don't tell it to
build a console executable. But linking works fine, if the object
file is used directly. But since we can have different main()
objects based on build flags, we enforce building console
applications binaries.
Differential Revision: https://phabricator.services.mozilla.com/D70665
Diffstat (limited to 'coreconf')
-rw-r--r-- | coreconf/WIN32.mk | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/coreconf/WIN32.mk b/coreconf/WIN32.mk index d5573abf4..0ef16895c 100644 --- a/coreconf/WIN32.mk +++ b/coreconf/WIN32.mk @@ -187,6 +187,8 @@ endif endif # Purify requires /FIXED:NO when linking EXEs. LDFLAGS += /FIXED:NO + # So the linker will find main in the gtestutil library + LDFLAGS += -SUBSYSTEM:CONSOLE endif ifneq ($(_MSC_VER),$(_MSC_VER_6)) # NSS has too many of these to fix, downgrade the warning |