From 69560d65b864b038b167843c3c78fef56d3f41d8 Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Wed, 1 Apr 2020 19:34:35 +0300 Subject: [PATCH] put linker flags into the end of cli args --- loffice-libcxx-wrapper.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/loffice-libcxx-wrapper.sh b/loffice-libcxx-wrapper.sh index 1feb8bb..16814df 100644 --- a/loffice-libcxx-wrapper.sh +++ b/loffice-libcxx-wrapper.sh @@ -1,3 +1,5 @@ #!/bin/sh -/usr/bin/clang++ "$@" $LIBCCX_LIBS +linker_flags="$(echo "$@" | tr ' ' '\n' | grep '^\-l' | tr '\n' ' ')" + +/usr/bin/clang++ "$@" $LIBCCX_LIBS $linker_flags