Skip to content

Commit

Permalink
build,win: limit LTCG only to the main node tagert
Browse files Browse the repository at this point in the history
  • Loading branch information
refack committed Oct 30, 2018
1 parent a820580 commit 3521f8a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
10 changes: 0 additions & 10 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,6 @@
'OmitFramePointers': 'false',
'BasicRuntimeChecks': 3, # /RTC1
'MultiProcessorCompilation': 'true',
'AdditionalOptions': [
'/bigobj', # prevent error C1128 in VS2015
],
},
'VCLinkerTool': {
'LinkIncremental': 2, # enable incremental linking
Expand Down Expand Up @@ -229,12 +226,7 @@
]
},
'VCLinkerTool': {
'OptimizeReferences': 2, # /OPT:REF
'EnableCOMDATFolding': 2, # /OPT:ICF
'LinkIncremental': 1, # disable incremental linking
'AdditionalOptions': [
'/LTCG:INCREMENTAL', # incremental link-time code generation
]
}
}
}, {
Expand All @@ -258,8 +250,6 @@
'EnableIntrinsicFunctions': 'true',
'RuntimeTypeInfo': 'false',
'MultiProcessorCompilation': 'true',
'AdditionalOptions': [
],
}
}
}
Expand Down
24 changes: 22 additions & 2 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,29 @@
],

# - "C4244: conversion from 'type1' to 'type2', possible loss of data"
# Ususaly safe. Disable for `dep`, enable for `src`
# Disabled for `/deps/`, so re-enable for `/src/`.
'msvs_disabled_warnings!': [4244],

'configurations': {
'Release': {
'msvs_settings': {
'conditions': [
['node_with_ltcg=="true"', {
'VCLinkerTool': {
'OptimizeReferences': 2, # /OPT:REF
'EnableCOMDATFolding': 2, # /OPT:ICF
'AdditionalOptions': [
'/LTCG:INCREMENTAL', # incremental link-time code generation
]
}
}, {
'VCLinkerTool': {
'LinkIncremental': 2 # enable incremental linking
},
}],
]
},
},
},
'conditions': [
[ 'node_intermediate_lib_type=="static_library" and node_shared=="true" and OS=="aix"', {
# For AIX, shared lib is linked by static lib and .exp. In the
Expand Down

0 comments on commit 3521f8a

Please sign in to comment.