summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorSitsofe Wheeler <sitsofe@yahoo.com>2020-08-21 20:35:03 +0100
committerSitsofe Wheeler <sitsofe@yahoo.com>2020-09-12 11:54:18 +0100
commit76bc30ca118fda404f19c17d97bafdba9779c4c2 (patch)
tree6a810b06d172a0a384ada908642b7e9a5e84074e /configure
parent16d40a15783f9181d64082fc00a970dff485798f (diff)
downloadfio-76bc30ca118fda404f19c17d97bafdba9779c4c2.tar.gz
fio-76bc30ca118fda404f19c17d97bafdba9779c4c2.tar.bz2
configure/Makefile: add option to generate pdb symbols
Recent versions of Windows clang and LLVM's lld have the ability to build Windows PDB symbols for debugging so add an explicit option to test for support and use it so. Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure28
1 files changed, 28 insertions, 0 deletions
diff --git a/configure b/configure
index 43433657..355b6958 100755
--- a/configure
+++ b/configure
@@ -193,6 +193,8 @@ for opt do
;;
--target-win-ver=*) target_win_ver="$optarg"
;;
+ --enable-pdb) pdb="yes"
+ ;;
--build-static) build_static="yes"
;;
--enable-gfio) gfio_check="yes"
@@ -256,6 +258,7 @@ if test "$show_help" = "yes" ; then
echo "--extra-cflags= Specify extra CFLAGS to pass to compiler"
echo "--build-32bit-win Enable 32-bit build on Windows"
echo "--target-win-ver= Minimum version of Windows to target (XP or 7)"
+ echo "--enable-pdb Enable Windows PDB symbols generation (needs clang/lld)"
echo "--build-static Build a static fio"
echo "--esx Configure build options for esx"
echo "--enable-gfio Enable building of gtk gfio"
@@ -2702,6 +2705,27 @@ if compile_prog "" "" "statx_syscall"; then
fi
print_config "statx(2)/syscall" "$statx_syscall"
+##########################################
+# check for Windows PDB generation support
+if test "pdb" != "no" ; then
+ cat > $TMPC <<EOF
+int main(void)
+{
+ return 0;
+}
+EOF
+ if compile_prog "-g -gcodeview" "-fuse-ld=lld -Wl,-pdb,$TMPO" "pdb"; then
+ pdb=yes
+ else
+ if test "$pdb" = "yes"; then
+ feature_not_found "PDB" "clang and lld"
+ fi
+ pdb=no
+ fi
+else
+ pdb=no
+fi
+print_config "Windows PDB generation" "$pdb"
#############################################################################
if test "$wordsize" = "64" ; then
@@ -3024,6 +3048,10 @@ fi
if test "$dynamic_engines" = "yes" ; then
output_sym "CONFIG_DYNAMIC_ENGINES"
fi
+if test "$pdb" = yes; then
+ output_sym "CONFIG_PDB"
+fi
+
print_config "Lib-based ioengines dynamic" "$dynamic_engines"
cat > $TMPC << EOF
int main(int argc, char **argv)