[vlc-commits] package/win32: build.sh: add an option to set the PDB source file mapping
Steve Lhomme
git at videolan.org
Wed Jul 1 16:12:41 CEST 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jul 1 08:24:33 2020 +0200| [990d460b71500b7c9906778b7b4300ff5600c7aa] | committer: Steve Lhomme
package/win32: build.sh: add an option to set the PDB source file mapping
This can be useful when cross-compiling. The UNIX pathes need to be mapped
to a Windows path that the debugger can use.
So if you build with "-D c:/vlc" the debugger will look for VLC sources in
c:\vlc, as if they were originally built from there.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=990d460b71500b7c9906778b7b4300ff5600c7aa
---
extras/package/win32/build.sh | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/extras/package/win32/build.sh b/extras/package/win32/build.sh
index 0533a7cf46..568159907b 100755
--- a/extras/package/win32/build.sh
+++ b/extras/package/win32/build.sh
@@ -28,6 +28,8 @@ OPTIONS:
-s Interactive shell (get correct environment variables for build)
-b <url> Enable breakpad support and send crash reports to this URL
-d Create PDB files during the build
+ -D <win_path> Create PDB files during the build, map the VLC sources to <win_path>
+ e.g.: -D c:/sources/vlc
-x Add extra checks when compiling
-u Use the Universal C Runtime (instead of msvcrt)
-w Restrict to Windows Store APIs
@@ -37,7 +39,7 @@ EOF
}
ARCH="x86_64"
-while getopts "hra:pcli:sb:dxuwzo:" OPTION
+while getopts "hra:pcli:sb:dD:xuwzo:" OPTION
do
case $OPTION in
h)
@@ -72,6 +74,10 @@ do
d)
WITH_PDB="yes"
;;
+ D)
+ WITH_PDB="yes"
+ PDB_MAP=$OPTARG
+ ;;
x)
EXTRA_CHECKS="yes"
;;
@@ -266,6 +272,10 @@ echo $PATH
mkdir -p contrib/contrib-$SHORTARCH && cd contrib/contrib-$SHORTARCH
if [ ! -z "$WITH_PDB" ]; then
CONTRIBFLAGS="$CONTRIBFLAGS --enable-pdb"
+ if [ ! -z "$PDB_MAP" ]; then
+ CFLAGS="$CFLAGS -fdebug-prefix-map='$VLC_ROOT_PATH'='$PDB_MAP'"
+ CXXFLAGS="$CXXFLAGS -fdebug-prefix-map='$VLC_ROOT_PATH'='$PDB_MAP'"
+ fi
fi
if [ ! -z "$BREAKPAD" ]; then
CONTRIBFLAGS="$CONTRIBFLAGS --enable-breakpad"
@@ -280,6 +290,10 @@ if [ ! -z "$WINSTORE" ]; then
# we don't use a special toolchain to trigger the detection in contribs so force it manually
export HAVE_WINSTORE=1
fi
+
+export CFLAGS
+export CXXFLAGS
+
${VLC_ROOT_PATH}/contrib/bootstrap --host=$TRIPLET --prefix=../$CONTRIB_PREFIX $CONTRIBFLAGS
# Rebuild the contribs or use the prebuilt ones
More information about the vlc-commits
mailing list