summaryrefslogtreecommitdiff
path: root/configure.py
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2019-06-20 22:23:11 +0100
committerRich Trott <rtrott@gmail.com>2019-07-15 19:30:07 -0700
commita1cb14a4dc69ac2ae9eef0c4620681fada51d9f3 (patch)
tree8b868a32068f21ccdf0462ffee9a2893b8b8981d /configure.py
parent2a1503774469f941a5df90ee5bfa97130492a445 (diff)
downloadandroid-node-v8-a1cb14a4dc69ac2ae9eef0c4620681fada51d9f3.tar.gz
android-node-v8-a1cb14a4dc69ac2ae9eef0c4620681fada51d9f3.tar.bz2
android-node-v8-a1cb14a4dc69ac2ae9eef0c4620681fada51d9f3.zip
src: large pages option: FreeBSD support proposal
Enabling on amd64 and as Linux, are 2MB large. The ELF section linkage script is compatible only with GNU ld. PR-URL: https://github.com/nodejs/node/pull/28331 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/configure.py b/configure.py
index 2376095719..44d2eb2539 100755
--- a/configure.py
+++ b/configure.py
@@ -1039,22 +1039,23 @@ def configure_node(o):
else:
o['variables']['node_use_dtrace'] = 'false'
- if options.node_use_large_pages and flavor != 'linux':
+ if options.node_use_large_pages and not flavor in ('linux', 'freebsd'):
raise Exception(
'Large pages are supported only on Linux Systems.')
- if options.node_use_large_pages and flavor == 'linux':
+ if options.node_use_large_pages and flavor in ('linux', 'freebsd'):
if options.shared or options.enable_static:
raise Exception(
'Large pages are supported only while creating node executable.')
if target_arch!="x64":
raise Exception(
'Large pages are supported only x64 platform.')
- # Example full version string: 2.6.32-696.28.1.el6.x86_64
- FULL_KERNEL_VERSION=os.uname()[2]
- KERNEL_VERSION=FULL_KERNEL_VERSION.split('-')[0]
- if KERNEL_VERSION < "2.6.38":
- raise Exception(
- 'Large pages need Linux kernel version >= 2.6.38')
+ if flavor == 'linux':
+ # Example full version string: 2.6.32-696.28.1.el6.x86_64
+ FULL_KERNEL_VERSION=os.uname()[2]
+ KERNEL_VERSION=FULL_KERNEL_VERSION.split('-')[0]
+ if KERNEL_VERSION < "2.6.38" and flavor == 'linux':
+ raise Exception(
+ 'Large pages need Linux kernel version >= 2.6.38')
o['variables']['node_use_large_pages'] = b(options.node_use_large_pages)
if options.no_ifaddrs: