|
12 | 12 | 'node_use_openssl%': 'true',
|
13 | 13 | 'node_shared_openssl%': 'false',
|
14 | 14 | 'node_v8_options%': '',
|
| 15 | + 'node_target_type%': 'executable', |
15 | 16 | 'library_files': [
|
16 | 17 | 'src/node.js',
|
17 | 18 | 'lib/_debug_agent.js',
|
|
76 | 77 | 'targets': [
|
77 | 78 | {
|
78 | 79 | 'target_name': 'iojs',
|
79 |
| - 'type': 'executable', |
| 80 | + 'type': '<(node_target_type)', |
80 | 81 |
|
81 | 82 | 'dependencies': [
|
82 | 83 | 'node_js2c#host',
|
|
183 | 184 | ],
|
184 | 185 |
|
185 | 186 | 'conditions': [
|
| 187 | + # No node_main.cc for anything except executable |
| 188 | + [ 'node_target_type!="executable"', { |
| 189 | + 'sources!': [ |
| 190 | + 'src/node_main.cc', |
| 191 | + ], |
| 192 | + }], |
186 | 193 | [ 'v8_enable_i18n_support==1', {
|
187 | 194 | 'defines': [ 'NODE_HAVE_I18N_SUPPORT=1' ],
|
188 | 195 | 'dependencies': [
|
|
215 | 222 | './deps/openssl/openssl.gyp:openssl-cli',
|
216 | 223 | ],
|
217 | 224 | # Do not let unused OpenSSL symbols to slip away
|
218 |
| - 'xcode_settings': { |
219 |
| - 'OTHER_LDFLAGS': [ |
220 |
| - '-Wl,-force_load,<(PRODUCT_DIR)/libopenssl.a', |
221 |
| - ], |
222 |
| - }, |
223 | 225 | 'conditions': [
|
224 |
| - ['OS in "linux freebsd"', { |
225 |
| - 'ldflags': [ |
226 |
| - '-Wl,--whole-archive <(PRODUCT_DIR)/libopenssl.a -Wl,--no-whole-archive', |
| 226 | + # -force_load or --whole-archive are not applicable for |
| 227 | + # the static library |
| 228 | + [ 'node_target_type!="static_library"', { |
| 229 | + 'xcode_settings': { |
| 230 | + 'OTHER_LDFLAGS': [ |
| 231 | + '-Wl,-force_load,<(PRODUCT_DIR)/libopenssl.a', |
| 232 | + ], |
| 233 | + }, |
| 234 | + 'conditions': [ |
| 235 | + ['OS in "linux freebsd"', { |
| 236 | + 'ldflags': [ |
| 237 | + '-Wl,--whole-archive <(PRODUCT_DIR)/libopenssl.a', |
| 238 | + '-Wl,--no-whole-archive', |
| 239 | + ], |
| 240 | + }], |
227 | 241 | ],
|
228 | 242 | }],
|
229 | 243 | ],
|
|
304 | 318 | } ],
|
305 | 319 | [ 'v8_postmortem_support=="true"', {
|
306 | 320 | 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ],
|
307 |
| - 'xcode_settings': { |
308 |
| - 'OTHER_LDFLAGS': [ |
309 |
| - '-Wl,-force_load,<(V8_BASE)', |
310 |
| - ], |
311 |
| - }, |
| 321 | + 'conditions': [ |
| 322 | + # -force_load is not applicable for the static library |
| 323 | + [ 'node_target_type!="static_library"', { |
| 324 | + 'xcode_settings': { |
| 325 | + 'OTHER_LDFLAGS': [ |
| 326 | + '-Wl,-force_load,<(V8_BASE)', |
| 327 | + ], |
| 328 | + }, |
| 329 | + }], |
| 330 | + ], |
312 | 331 | }],
|
313 | 332 | [ 'node_shared_zlib=="false"', {
|
314 | 333 | 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
|
|
0 commit comments