From eb219511249f0319bf1ecd6a755a2501201fccb3 Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Fri, 13 May 2022 16:23:58 -0400 Subject: [PATCH] allow passing linker flag to link to standard C++ library --- python/olm_build.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/olm_build.py b/python/olm_build.py index 38053e0..1fe2d77 100644 --- a/python/olm_build.py +++ b/python/olm_build.py @@ -33,6 +33,13 @@ link_args = ["-L../build"] if DEVELOP and DEVELOP.lower() in ["yes", "true", "1"]: link_args.append('-Wl,-rpath=../build') +# If libolm is compiled statically, we may need to link to the C++ standard +# library dynamically. This flag allows passing the required linker flag to do +# so. +CXX_LIB = os.environ.get("CXX_LIB") +if CXX_LIB: + link_args.append(CXX_LIB) + headers_build = subprocess.Popen("make headers", shell=True) headers_build.wait()