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:
parent
f8fc2f8954
commit
7b39503b4a
@ -183,8 +183,12 @@ TEMPLATE = """
|
|||||||
|
|
||||||
namespace node {{
|
namespace node {{
|
||||||
|
|
||||||
|
namespace {{
|
||||||
|
|
||||||
{definitions}
|
{definitions}
|
||||||
|
|
||||||
|
}} // anonymous namespace
|
||||||
|
|
||||||
v8::Local<v8::String> LoadersBootstrapperSource(Environment* env) {{
|
v8::Local<v8::String> LoadersBootstrapperSource(Environment* env) {{
|
||||||
return internal_bootstrap_loaders_value.ToStringChecked(env->isolate());
|
return internal_bootstrap_loaders_value.ToStringChecked(env->isolate());
|
||||||
}}
|
}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user