diff options
author | rathann <dominik@greysector.net> | 2020-11-10 17:19:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-10 08:19:17 -0800 |
commit | 5d2c13f16af2183a5d1861828e512fe0f964990c (patch) | |
tree | 135458f7963e3e08bc347fb7b811d6300f8e7387 /scripts | |
parent | ffdaad6adb8fa45f3c9021228b8e880ca02ff9b9 (diff) | |
download | binaryen-5d2c13f16af2183a5d1861828e512fe0f964990c.tar.gz binaryen-5d2c13f16af2183a5d1861828e512fe0f964990c.tar.bz2 binaryen-5d2c13f16af2183a5d1861828e512fe0f964990c.zip |
Allow setting the path to libbinaryen.so shared library (#3025)
This makes it easier to install libbinaryen.so into an alternative
locations. Fixes part of issue #2999 for me.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/test/shared.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/test/shared.py b/scripts/test/shared.py index b443f4250..720ad2aa9 100644 --- a/scripts/test/shared.py +++ b/scripts/test/shared.py @@ -55,6 +55,10 @@ def parse_args(args): ' If not specified, the environment variable BINARYEN_ROOT= can also' ' be used to adjust this.')) parser.add_argument( + '--binaryen-lib', dest='binaryen_lib', default='', + help=('Specifies a path to where the built Binaryen shared library resides at.' + ' Default: ./lib relative to bin specified above.')) + parser.add_argument( '--binaryen-root', dest='binaryen_root', default='', help=('Specifies a path to the root of the Binaryen repository tree.' ' Default: the directory where this file check.py resides.')) @@ -120,6 +124,11 @@ if not options.binaryen_bin: options.binaryen_bin = os.path.normpath(os.path.abspath(options.binaryen_bin)) +if not options.binaryen_lib: + options.binaryen_lib = os.path.join(os.path.dirname(options.binaryen_bin), 'lib') + +options.binaryen_lib = os.path.normpath(os.path.abspath(options.binaryen_lib)) + # ensure BINARYEN_ROOT is set up os.environ['BINARYEN_ROOT'] = os.path.dirname(options.binaryen_bin) |