Skip to content

Commit 1877277

Browse files
committed
WIP: Windows Shared Lib
1 parent 765de1a commit 1877277

File tree

4 files changed

+34
-6
lines changed

4 files changed

+34
-6
lines changed

common.gypi

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,24 @@
7878
['OS == "android"', {
7979
'cflags': [ '-fPIE' ],
8080
'ldflags': [ '-fPIE', '-pie' ]
81+
}],
82+
['node_shared=="true"', {
83+
'msvs_settings': {
84+
'VCCLCompilerTool': {
85+
'RuntimeLibrary': 3, # MultiThreadedDebugDLL (/MDd)
86+
}
87+
}
88+
}],
89+
['node_shared=="false"', {
90+
'msvs_settings': {
91+
'VCCLCompilerTool': {
92+
'RuntimeLibrary': 1 # MultiThreadedDebug (/MTd)
93+
}
94+
}
8195
}]
8296
],
8397
'msvs_settings': {
8498
'VCCLCompilerTool': {
85-
'RuntimeLibrary': 1, # static debug
8699
'Optimization': 0, # /Od, no optimization
87100
'MinimalRebuild': 'false',
88101
'OmitFramePointers': 'false',
@@ -115,11 +128,24 @@
115128
['OS == "android"', {
116129
'cflags': [ '-fPIE' ],
117130
'ldflags': [ '-fPIE', '-pie' ]
131+
}],
132+
['node_shared=="true"', {
133+
'msvs_settings': {
134+
'VCCLCompilerTool': {
135+
'RuntimeLibrary': 2 # MultiThreadedDLL (/MD)
136+
}
137+
}
138+
}],
139+
['node_shared=="false"', {
140+
'msvs_settings': {
141+
'VCCLCompilerTool': {
142+
'RuntimeLibrary': 0 # MultiThreaded (/MT)
143+
}
144+
}
118145
}]
119146
],
120147
'msvs_settings': {
121148
'VCCLCompilerTool': {
122-
'RuntimeLibrary': 0, # static release
123149
'Optimization': 3, # /Ox, full optimization
124150
'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
125151
'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible

deps/v8/build/toolchain.gypi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@
11041104
'VCCLCompilerTool': {
11051105
'Optimization': '0',
11061106
'conditions': [
1107-
['component=="shared_library"', {
1107+
['component=="shared_library" or node_shared=="true"', {
11081108
'RuntimeLibrary': '3', # /MDd
11091109
}, {
11101110
'RuntimeLibrary': '1', # /MTd
@@ -1156,7 +1156,7 @@
11561156
'StringPooling': 'true',
11571157
'BasicRuntimeChecks': '0',
11581158
'conditions': [
1159-
['component=="shared_library"', {
1159+
['component=="shared_library" or node_shared=="true"', {
11601160
'RuntimeLibrary': '3', #/MDd
11611161
}, {
11621162
'RuntimeLibrary': '1', #/MTd
@@ -1347,7 +1347,7 @@
13471347
'FavorSizeOrSpeed': '0',
13481348
'StringPooling': 'true',
13491349
'conditions': [
1350-
['component=="shared_library"', {
1350+
['component=="shared_library" or node_shared=="true"', {
13511351
'RuntimeLibrary': '2', #/MD
13521352
}, {
13531353
'RuntimeLibrary': '0', #/MT

node.gyp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@
243243
'NODE_SHARED_MODE',
244244
],
245245
'conditions': [
246-
[ 'node_module_version!=""', {
246+
[ 'node_module_version!="" and OS!="win"', {
247247
'product_extension': 'so.<(node_module_version)',
248248
}]
249249
],

vcbuild.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ if /i "%1"=="without-intl" set i18n_arg=%1&goto arg-ok
7979
if /i "%1"=="download-all" set download_arg="--download=all"&goto arg-ok
8080
if /i "%1"=="ignore-flaky" set test_args=%test_args% --flaky-tests=dontcare&goto arg-ok
8181
if /i "%1"=="enable-vtune" set enable_vtune_arg=1&goto arg-ok
82+
if /i "%1"=="dll" set dll=1&goto arg-ok
8283

8384
echo Warning: ignoring invalid command line option `%1`.
8485

@@ -108,6 +109,7 @@ if defined noperfctr set configure_flags=%configure_flags% --without-perfctr& se
108109
if defined release_urlbase set release_urlbase_arg=--release-urlbase=%release_urlbase%
109110
if defined download_arg set configure_flags=%configure_flags% %download_arg%
110111
if defined enable_vtune_arg set configure_flags=%configure_flags% --enable-vtune-profiling
112+
if defined dll set configure_flags=%configure_flags% --shared
111113

112114
if "%i18n_arg%"=="full-icu" set configure_flags=%configure_flags% --with-intl=full-icu
113115
if "%i18n_arg%"=="small-icu" set configure_flags=%configure_flags% --with-intl=small-icu

0 commit comments

Comments
 (0)