Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,15 @@
/test/parallel/test-runner-* @nodejs/test_runner

# Single Executable Applications
/deps/LIEF @nodejs/single-executable
/deps/postject @nodejs/single-executable
/doc/api/single-executable-applications.md @nodejs/single-executable
/doc/contributing/maintaining/maintaining-single-executable-application-support.md @nodejs/single-executable
/src/node_sea* @nodejs/single-executable
/test/fixtures/postject-copy @nodejs/single-executable
/test/sea @nodejs/single-executable
/tools/dep_updaters/update-postject.sh @nodejs/single-executable
/tools/dep_updaters/update-lief.sh @nodejs/single-executable

# Permission Model
/doc/api/permissions.md @nodejs/security-wg
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ tools/*/*.i.tmp
# Ignore dependencies fetched by tools/v8/fetch_deps.py
/deps/.cipd
!deps/LIEF/**
deps/LIEF/*.vcxproj*
deps/LIEF/*.sln

# === Rules for Windows vcbuild.bat ===
/temp-vcbuild
Expand Down
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,8 @@ The externally maintained libraries used by Node.js are:
SOFTWARE.
"""

- postject, located at test/fixtures/postject-copy, is licensed as follows:
- postject, located at test/fixtures/postject-copy and used as a basis for
src/node_sea_bin.cc, is licensed as follows:
"""
Postject is licensed for use as follows:

Expand Down
45 changes: 45 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,28 @@
dest='shared_libuv_libpath',
help='a directory to search for the shared libuv DLL')

shared_optgroup.add_argument('--shared-lief',
action='store_true',
dest='shared_lief',
default=None,
help='link to a shared lief DLL instead of static linking')

shared_optgroup.add_argument('--shared-lief-includes',
action='store',
dest='shared_lief_includes',
help='directory containing lief header files')

shared_optgroup.add_argument('--shared-lief-libname',
action='store',
dest='shared_lief_libname',
default='LIEF',
help='alternative lib name to link to [default: %(default)s]')

shared_optgroup.add_argument('--shared-lief-libpath',
action='store',
dest='shared_lief_libpath',
help='a directory to search for the shared lief DLL')

shared_optgroup.add_argument('--shared-nbytes',
action='store_true',
dest='shared_nbytes',
Expand Down Expand Up @@ -898,6 +920,12 @@
default=None,
help='do not install the bundled Amaro (TypeScript utils)')

parser.add_argument('--without-lief',
action='store_true',
dest='without_lief',
default=None,
help='build without LIEF (Library for instrumenting executable formats)')

parser.add_argument('--without-npm',
action='store_true',
dest='without_npm',
Expand Down Expand Up @@ -1689,6 +1717,14 @@ def configure_node(o):
o['variables']['single_executable_application'] = b(not options.disable_single_executable_application)
if options.disable_single_executable_application:
o['defines'] += ['DISABLE_SINGLE_EXECUTABLE_APPLICATION']
o['variables']['node_use_lief'] = 'false'
else:
if (options.without_lief is not None):
o['variables']['node_use_lief'] = b(not options.without_lief)
elif flavor in ('mac', 'linux', 'win'):
o['variables']['node_use_lief'] = 'true'
else:
o['variables']['node_use_lief'] = 'false'

o['variables']['node_with_ltcg'] = b(options.with_ltcg)
if flavor != 'win' and options.with_ltcg:
Expand Down Expand Up @@ -1933,6 +1969,14 @@ def without_ssl_error(option):

configure_library('openssl', o)

def configure_lief(o):
if options.without_lief:
if options.shared_lief:
error('--without-lief is incompatible with --shared-lief')
return

configure_library('lief', o, pkgname='LIEF')

def configure_sqlite(o):
o['variables']['node_use_sqlite'] = b(not options.without_sqlite)
if options.without_sqlite:
Expand Down Expand Up @@ -2390,6 +2434,7 @@ def make_bin_override():
configure_library('nghttp2', output, pkgname='libnghttp2')
configure_library('nghttp3', output, pkgname='libnghttp3')
configure_library('ngtcp2', output, pkgname='libngtcp2')
configure_lief(output);
configure_sqlite(output);
configure_library('uvwasi', output)
configure_library('zstd', output, pkgname='libzstd')
Expand Down
Loading
Loading