1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
Description: detect and use system shared binaryen
Author: Jonas Smedegaard <dr@jones.dk>
Last-Update: 2020-11-04
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/tools/settings_template.py
+++ b/tools/settings_template.py
@@ -19,7 +19,7 @@
EMSCRIPTEN_ROOT = os.path.expanduser(os.getenv('EMSCRIPTEN', '{{{ EMSCRIPTEN_ROOT }}}')) # directory
LLVM_ROOT = os.path.expanduser(os.getenv('LLVM', '{{{ LLVM_ROOT }}}')) # directory
-BINARYEN_ROOT = os.path.expanduser(os.getenv('BINARYEN', '')) # directory
+BINARYEN_ROOT = os.path.expanduser(os.getenv('BINARYEN', '{{{ BINARYEN_ROOT }}}')) # directory
# Location of the node binary to use for running the JS parts of the compiler.
# This engine must exist, or nothing can be compiled.
--- a/tools/config.py
+++ b/tools/config.py
@@ -176,6 +176,9 @@
llvm_root = os.path.dirname(which('llvm-dis') or '/usr/bin/llvm-dis')
config_file = config_file.replace('\'{{{ LLVM_ROOT }}}\'', repr(llvm_root))
+ binaryen_root = os.path.dirname(os.path.dirname(which('binaryen') or '/usr/bin/binaryen'))
+ config_file = config_file.replace('\'{{{ BINARYEN_ROOT }}}\'', repr(binaryen_root))
+
node = which('node') or which('nodejs') or 'node'
config_file = config_file.replace('\'{{{ NODE }}}\'', repr(node))
|