Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c843e58

Browse filesBrowse files
Alex Hultmancjihrig
authored andcommitted
build: export zlib symbols on Windows
Base the generated openssl.def on existing zlib.def. We cannot specify more than one DEF file per executable so we need to merge the two DEF files to expose both OpenSSL and Zlib functionality to addons. If OpenSSL is not used, link against zlib.def itself. PR-URL: #7983 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent a385277 commit c843e58
Copy full SHA for c843e58

File tree

Expand file treeCollapse file tree

2 files changed

+16
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+16
-0
lines changed
Open diff view settings
Collapse file

‎node.gyp‎

Copy file name to clipboardExpand all lines: node.gyp
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,14 @@
372372
'-Wl,--no-whole-archive',
373373
],
374374
}],
375+
# openssl.def is based on zlib.def, zlib symbols
376+
# are always exported.
375377
['use_openssl_def==1', {
376378
'sources': ['<(SHARED_INTERMEDIATE_DIR)/openssl.def'],
377379
}],
380+
['OS=="win" and use_openssl_def==0', {
381+
'sources': ['deps/zlib/win32/zlib.def'],
382+
}],
378383
],
379384
}],
380385
],
@@ -570,6 +575,8 @@
570575
'-X^DSO',
571576
'-X^_',
572577
'-X^private_',
578+
# Base generated DEF on zlib.def
579+
'-Bdeps/zlib/win32/zlib.def'
573580
],
574581
},
575582
'conditions': [
Collapse file

‎tools/mkssldef.py‎

Copy file name to clipboardExpand all lines: tools/mkssldef.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
categories = []
88
defines = []
99
excludes = []
10+
bases = []
1011

1112
if __name__ == '__main__':
1213
out = sys.stdout
@@ -18,6 +19,7 @@
1819
elif option.startswith('-C'): categories += option[2:].split(',')
1920
elif option.startswith('-D'): defines += option[2:].split(',')
2021
elif option.startswith('-X'): excludes += option[2:].split(',')
22+
elif option.startswith('-B'): bases += option[2:].split(',')
2123

2224
excludes = map(re.compile, excludes)
2325
exported = []
@@ -40,5 +42,12 @@ def test(expr):
4042
if not satisfy(meta[3], categories): continue
4143
exported.append(name)
4244

45+
for filename in bases:
46+
for line in open(filename).readlines():
47+
line = line.strip()
48+
if line == 'EXPORTS': continue
49+
if line[0] == ';': continue
50+
exported.append(line)
51+
4352
print('EXPORTS', file=out)
4453
for name in sorted(exported): print(' ', name, file=out)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.