tools: hide symbols for builtin JS files in binary

Do not expose symbols like `node::internal_process_next_tick_value`,
`node::internal_process_next_tick_key` in the created `node` binary
by wrapping them in an anonymous namespace.

PR-URL: https://github.com/nodejs/node/pull/20634
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
This commit is contained in:
Anna Henningsen 2018-05-09 19:00:57 +02:00
parent f8fc2f8954
commit 7b39503b4a
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9

View File

@ -183,8 +183,12 @@ TEMPLATE = """
namespace node {{
namespace {{
{definitions}
}} // anonymous namespace
v8::Local<v8::String> LoadersBootstrapperSource(Environment* env) {{
return internal_bootstrap_loaders_value.ToStringChecked(env->isolate());
}}