Skip to content

Commit

Permalink
build: add common defines
Browse files Browse the repository at this point in the history
* `V8_DEPRECATION_WARNINGS` is here for explicity. It is already defined
  in `node.gypi`, and `addon.gypi`.
* `V8_IMMINENT_DEPRECATION_WARNINGS` added to warn addons authors.
* `OPENSSL_THREADS` apears in the openSSL `.h` files, and was only
  defined via GYP for the node build.

PR-URL: #23426
Fixes: #23167
Refs: #23122
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
  • Loading branch information
refack committed Nov 5, 2018
1 parent 809be43 commit 765766b
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
'node_module_version%': '',
'node_with_ltcg%': '',
'node_use_pch%': 'false',
'node_shared_openssl%': 'false',

'node_tag%': '',
'uv_library%': 'static_library',

'clang%': 0,

'openssl_no_asm%': 0,
'openssl_fips%': '',

# Reset this number to 0 on major V8 upgrades.
Expand Down Expand Up @@ -261,6 +263,14 @@
}
}
},

# Defines these mostly for node-gyp to pickup, and warn addon authors of
# imminent V8 deprecations, also to sync how dependencies are configured.
'defines': [
'V8_DEPRECATION_WARNINGS',
'V8_IMMINENT_DEPRECATION_WARNINGS',
],

# Forcibly disable -Werror. We support a wide range of compilers, it's
# simply not feasible to squelch all warnings, never mind that the
# libraries in deps/ are not under our control.
Expand Down Expand Up @@ -503,7 +513,18 @@
'ldflags': [
'-Wl,--export-dynamic',
],
}]
}],
['node_shared_openssl!="true"', {
# `OPENSSL_THREADS` is defined via GYP for openSSL for all architectures.
'defines': [
'OPENSSL_THREADS',
],
}],
['node_shared_openssl!="true" and openssl_no_asm==1', {
'defines': [
'OPENSSL_NO_ASM',
],
}],
],
}
}

0 comments on commit 765766b

Please sign in to comment.