summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure.py6
-rw-r--r--node.gypi14
-rw-r--r--src/large_pages/ld.implicit.script.lld3
3 files changed, 22 insertions, 1 deletions
diff --git a/configure.py b/configure.py
index 3d752f434b..beab9ceccc 100755
--- a/configure.py
+++ b/configure.py
@@ -401,6 +401,11 @@ parser.add_option('--use-largepages',
help='build with Large Pages support. This feature is supported only on Linux kernel' +
'>= 2.6.38 with Transparent Huge pages enabled and FreeBSD')
+parser.add_option('--use-largepages-script-lld',
+ action='store_true',
+ dest='node_use_large_pages_script_lld',
+ help='link against the LLVM ld linker script. Implies -fuse-ld=lld in the linker flags')
+
intl_optgroup.add_option('--with-intl',
action='store',
dest='with_intl',
@@ -1048,6 +1053,7 @@ def configure_node(o):
raise Exception(
'Large pages need Linux kernel version >= 2.6.38')
o['variables']['node_use_large_pages'] = b(options.node_use_large_pages)
+ o['variables']['node_use_large_pages_script_lld'] = b(options.node_use_large_pages_script_lld)
if options.no_ifaddrs:
o['defines'] += ['SUNOS_NO_IFADDRS']
diff --git a/node.gypi b/node.gypi
index 5fd1d8e1d4..df10c97280 100644
--- a/node.gypi
+++ b/node.gypi
@@ -295,12 +295,24 @@
'ldflags': [ '-Wl,-z,relro',
'-Wl,-z,now' ]
}],
- [ 'OS=="linux" and target_arch=="x64" and node_use_large_pages=="true"', {
+ [ 'OS=="linux" and '
+ 'target_arch=="x64" and '
+ 'node_use_large_pages=="true" and '
+ 'node_use_large_pages_script_lld=="false"', {
'ldflags': [
'-Wl,-T',
'<!(realpath src/large_pages/ld.implicit.script)',
]
}],
+ [ 'OS=="linux" and '
+ 'target_arch=="x64" and '
+ 'node_use_large_pages=="true" and '
+ 'node_use_large_pages_script_lld=="true"', {
+ 'ldflags': [
+ '-Wl,-T',
+ '<!(realpath src/large_pages/ld.implicit.script.lld)',
+ ]
+ }],
[ 'node_use_openssl=="true"', {
'defines': [ 'HAVE_OPENSSL=1' ],
'conditions': [
diff --git a/src/large_pages/ld.implicit.script.lld b/src/large_pages/ld.implicit.script.lld
new file mode 100644
index 0000000000..b85510bcf0
--- /dev/null
+++ b/src/large_pages/ld.implicit.script.lld
@@ -0,0 +1,3 @@
+ PROVIDE (__nodetext = .);
+ PROVIDE (_nodetext = .);
+ PROVIDE (nodetext = .);