Commit 499b46fd authored by Cyber Sinh's avatar Cyber Sinh Committed by Carl Eugen Hoyos

compat/windows/makedef: Allow building shared libs with MSVC under WSL

A similar patch was posted by Gilles Khouzam in his blog.
parent f9a061a3
...@@ -48,7 +48,7 @@ trap 'rm -f -- $libname' EXIT ...@@ -48,7 +48,7 @@ trap 'rm -f -- $libname' EXIT
if [ -n "$AR" ]; then if [ -n "$AR" ]; then
$AR rcs ${libname} $@ >/dev/null $AR rcs ${libname} $@ >/dev/null
else else
lib -out:${libname} $@ >/dev/null lib.exe -out:${libname} $@ >/dev/null
fi fi
if [ $? != 0 ]; then if [ $? != 0 ]; then
echo "Could not create temporary library." >&2 echo "Could not create temporary library." >&2
...@@ -108,7 +108,7 @@ if [ -n "$NM" ]; then ...@@ -108,7 +108,7 @@ if [ -n "$NM" ]; then
cut -d' ' -f3 | cut -d' ' -f3 |
sed -e "s/^${prefix}//") sed -e "s/^${prefix}//")
else else
dump=$(dumpbin -linkermember:1 ${libname} | dump=$(dumpbin.exe -linkermember:1 ${libname} |
sed -e '/public symbols/,$!d' -e '/^ \{1,\}Summary/,$d' -e "s/ \{1,\}${prefix}/ /" -e 's/ \{1,\}/ /g' | sed -e '/public symbols/,$!d' -e '/^ \{1,\}Summary/,$d' -e "s/ \{1,\}${prefix}/ /" -e 's/ \{1,\}/ /g' |
tail -n +2 | tail -n +2 |
cut -d' ' -f3) cut -d' ' -f3)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment