Skip to content

Commit

Permalink
[build] Add force_dynamic_crt option to build a static library with /…
Browse files Browse the repository at this point in the history
…MD on windows

Adds option to build a V8 library statically, but with the options on
windows that allows it to be subsequently included in another DLL. On
Windows this is required for it to correclty link against the correct
C++ runtime. Require for our Node.js shared library build.

Reference:  nodejs/node#7487

BUG=
[email protected], [email protected]

Committed: https://crrev.com/9cf88c1c364cf76c1e745aa63196768435e8ef5d
Review-Url: https://codereview.chromium.org/2149963002
Cr-Original-Commit-Position: refs/heads/master@{#37814}
Cr-Commit-Position: refs/heads/master@{#37856}
  • Loading branch information
sxa authored and Commit bot committed Jul 19, 2016
1 parent ceb0afb commit 6f68f30
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gypfiles/toolchain.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
'coverage%': 0,
'v8_target_arch%': '<(target_arch)',
'v8_host_byteorder%': '<!(python -c "import sys; print sys.byteorder")',
'force_dynamic_crt%': 0,
# Native Client builds currently use the V8 ARM JIT and
# arm/simulator-arm.cc to defer the significant effort required
# for NaCl JIT support. The nacl_target_arch variable provides
Expand Down Expand Up @@ -1110,7 +1111,7 @@
'VCCLCompilerTool': {
'Optimization': '0',
'conditions': [
['component=="shared_library"', {
['component=="shared_library" or force_dynamic_crt==1', {
'RuntimeLibrary': '3', # /MDd
}, {
'RuntimeLibrary': '1', # /MTd
Expand Down Expand Up @@ -1162,7 +1163,7 @@
'StringPooling': 'true',
'BasicRuntimeChecks': '0',
'conditions': [
['component=="shared_library"', {
['component=="shared_library" or force_dynamic_crt==1', {
'RuntimeLibrary': '3', #/MDd
}, {
'RuntimeLibrary': '1', #/MTd
Expand Down Expand Up @@ -1353,7 +1354,7 @@
'FavorSizeOrSpeed': '0',
'StringPooling': 'true',
'conditions': [
['component=="shared_library"', {
['component=="shared_library" or force_dynamic_crt==1', {
'RuntimeLibrary': '2', #/MD
}, {
'RuntimeLibrary': '0', #/MT
Expand Down

0 comments on commit 6f68f30

Please sign in to comment.