From 1a531b4e4447b9296efacdd9e4c4fa18ec6436e0 Mon Sep 17 00:00:00 2001 From: Bradley Meck Date: Sat, 22 Aug 2015 13:36:03 -0500 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/2497 Reviewed-By: fishrock123 - Jeremiah Senkpiel Reviewed-By: jasnell - James M Snell Reviewed-By: evanlucas - Evan Lucas Reviewed-By: cjihrig - Colin Ihrig --- configure | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure b/configure index cd594d62788658..f33821cd3a88a8 100755 --- a/configure +++ b/configure @@ -84,6 +84,13 @@ parser.add_option("--fully-static", help="Generate an executable without external dynamic libraries. This " "will not work on OSX when using default compilation environment") +parser.add_option("--link-module", + action="append", + dest="linked_module", + help="Path to a JS file to be bundled in the binary as a builtin." + "This module will be referenced by basename without extension." + "Can be used multiple times") + parser.add_option("--openssl-no-asm", action="store_true", dest="openssl_no_asm", @@ -697,6 +704,9 @@ def configure_node(o): if options.enable_static: o['variables']['node_target_type'] = 'static_library' + if options.linked_module: + o['variables']['library_files'] = options.linked_module + def configure_library(lib, output): shared_lib = 'shared_' + lib