Skip to content

Commit 1a531b4

Browse files
bmeckFishrock123
authored andcommitted
Introduce --link-module to ./configure
- Allows specifying a _third_party_main outside of the node repository - Allows embedders to create custom builtin modules outside of node's repository PR-URL: #2497 Reviewed-By: fishrock123 - Jeremiah Senkpiel <[email protected]> Reviewed-By: jasnell - James M Snell <[email protected]> Reviewed-By: evanlucas - Evan Lucas <[email protected]> Reviewed-By: cjihrig - Colin Ihrig <[email protected]>
1 parent 31823e3 commit 1a531b4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

configure

+10
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ parser.add_option("--fully-static",
8484
help="Generate an executable without external dynamic libraries. This "
8585
"will not work on OSX when using default compilation environment")
8686

87+
parser.add_option("--link-module",
88+
action="append",
89+
dest="linked_module",
90+
help="Path to a JS file to be bundled in the binary as a builtin."
91+
"This module will be referenced by basename without extension."
92+
"Can be used multiple times")
93+
8794
parser.add_option("--openssl-no-asm",
8895
action="store_true",
8996
dest="openssl_no_asm",
@@ -697,6 +704,9 @@ def configure_node(o):
697704
if options.enable_static:
698705
o['variables']['node_target_type'] = 'static_library'
699706

707+
if options.linked_module:
708+
o['variables']['library_files'] = options.linked_module
709+
700710

701711
def configure_library(lib, output):
702712
shared_lib = 'shared_' + lib

0 commit comments

Comments
 (0)