MCPcopy Index your code
hub / github.com/nodejs/node / addLibraryPath

Function addLibraryPath

test/common/shared-lib-util.js:11–31  ·  view source on GitHub ↗
(env)

Source from the content-addressed store, hash-verified

9// If node executable is linked to shared lib, need to take care about the
10// shared lib path.
11function addLibraryPath(env) {
12 if (!kNodeShared) {
13 return;
14 }
15
16 env ||= process.env;
17
18 env.LD_LIBRARY_PATH =
19 (env.LD_LIBRARY_PATH ? env.LD_LIBRARY_PATH + path.delimiter : '') +
20 kExecPath;
21 // For AIX.
22 env.LIBPATH =
23 (env.LIBPATH ? env.LIBPATH + path.delimiter : '') +
24 kExecPath;
25 // For macOS.
26 env.DYLD_LIBRARY_PATH =
27 (env.DYLD_LIBRARY_PATH ? env.DYLD_LIBRARY_PATH + path.delimiter : '') +
28 kExecPath;
29 // For Windows.
30 env.PATH = (env.PATH ? env.PATH + path.delimiter : '') + kExecPath;
31}
32
33// Get the full path of shared lib.
34function getSharedLibPath() {

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…