CFLAGS := -march=native $(CFLAGS)
endif
+ifdef CONFIG_PDB
+ LINK_PDBFILE ?= -Wl,-pdb,$(dir $@)/$(basename $(@F)).pdb
+ CFLAGS := -gcodeview $(CFLAGS)
+ LDFLAGS += -fuse-ld=lld $(LINK_PDBFILE)
+endif
+
ifdef CONFIG_GFIO
PROGS += gfio
endif
;;
--target-win-ver=*) target_win_ver="$optarg"
;;
+ --enable-pdb) pdb="yes"
+ ;;
--build-static) build_static="yes"
;;
--enable-gfio) gfio_check="yes"
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"
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
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)
signtool sign /as /n "%SIGNING_CN%" /tr http://timestamp.digicert.com /td sha256 /fd sha256 ..\..\t\*.exe\r
)\r
\r
-"%WIX%bin\candle" -nologo -arch %FIO_ARCH% -dFioVersionNumbers="%FIO_VERSION_NUMBERS%" install.wxs\r
+if exist ..\..\fio.pdb (\r
+ set FIO_PDB=true\r
+) else (\r
+ set FIO_PDB=false\r
+)\r
+\r
+"%WIX%bin\candle" -nologo -arch %FIO_ARCH% -dFioVersionNumbers="%FIO_VERSION_NUMBERS%" -dFioPDB="%FIO_PDB%" install.wxs\r
@if ERRORLEVEL 1 goto end\r
"%WIX%bin\candle" -nologo -arch %FIO_ARCH% examples.wxs\r
@if ERRORLEVEL 1 goto end\r
\r
if defined SIGN_FIO (\r
signtool sign /n "%SIGNING_CN%" /tr http://timestamp.digicert.com /td sha256 /fd sha256 %FIO_VERSION%-%FIO_ARCH%.msi\r
-)
\ No newline at end of file
+)\r
<File Source="..\..\fio.exe"/>
<Environment Action="set" Part="last" Id="PATH" Name="PATH" Value="[INSTALLDIR]fio\" System="yes"/>
</Component>
+ <?if $(var.FioPDB) = true?>
+ <Component>
+ <File Id="fio.pdb" Name="fio.pdb" Source="..\..\fio.pdb"/>
+ </Component>
+ <?endif?>
<Component>
<File Id="README" Name="README.txt" Source="..\..\README"/>
</Component>
<Feature Id="AlwaysInstall" Absent="disallow" ConfigurableDirectory="INSTALLDIR" Display="hidden" Level="1" Title="Flexible I/O Tester">
<ComponentRef Id="fio.exe"/>
+ <?if $(var.FioPDB) = true?>
+ <ComponentRef Id="fio.pdb"/>
+ <?endif?>
<ComponentRef Id="HOWTO"/>
<ComponentRef Id="README"/>
<ComponentRef Id="REPORTING_BUGS"/>