Skip to content

Commit da0cc2f

Browse files
committed
fixup! build: build codecache and snapshot with libnode
1 parent 1b0519f commit da0cc2f

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

node.gyp

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,7 @@
678678
],
679679
}],
680680
[ 'node_shared=="false"', {
681+
# Keep this whole-archive section in sync with the `node_lib` target below.
681682
'xcode_settings': {
682683
'OTHER_LDFLAGS': [
683684
'-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)node_base<(STATIC_LIB_SUFFIX)',
@@ -1216,19 +1217,30 @@
12161217
],
12171218
}],
12181219
[ 'node_shared=="true"', {
1220+
# Keep this whole-archive section in sync with the `node_exe` target above.
12191221
'xcode_settings': {
12201222
'OTHER_LDFLAGS': [
12211223
'-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)node_base<(STATIC_LIB_SUFFIX)',
12221224
],
12231225
},
1224-
'conditions': [
1225-
['OS!="aix" and OS!="os400" and OS!="mac" and OS!="ios"', {
1226-
'ldflags': [
1227-
'-Wl,--whole-archive',
1228-
'<(obj_dir)/<(STATIC_LIB_PREFIX)node_base<(STATIC_LIB_SUFFIX)',
1229-
'-Wl,--no-whole-archive',
1226+
'msvs_settings': {
1227+
'VCLinkerTool': {
1228+
'AdditionalOptions': [
1229+
'/WHOLEARCHIVE:<(PRODUCT_DIR)/lib/<(STATIC_LIB_PREFIX)node_base<(STATIC_LIB_SUFFIX)',
1230+
'/WHOLEARCHIVE:<(PRODUCT_DIR)/lib/<(STATIC_LIB_PREFIX)v8_base_without_compiler<(STATIC_LIB_SUFFIX)',
12301231
],
1232+
},
1233+
},
1234+
'conditions': [
1235+
['node_use_bundled_v8=="true"', {
1236+
'xcode_settings': {
1237+
'OTHER_LDFLAGS': [
1238+
'-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)v8_base_without_compiler<(STATIC_LIB_SUFFIX)',
1239+
],
1240+
},
12311241
}],
1242+
# gyp automatically applies `--whole-archive` to static dependencies of `shared_library` targets.
1243+
# No need to add the flags again here.
12321244
],
12331245
}],
12341246
[ 'node_shared=="true" and node_module_version!="" and OS!="win"', {

0 commit comments

Comments
 (0)