Commit c9a1c878 authored by unknown's avatar unknown

build fixes for 5.1.17


CMakeLists.txt:
  use correct runtime library for RelWithDebugInfo target and always generate .map files
scripts/make_win_bin_dist:
  use RelWithDebInfo target output if exists, include copy mysqld and mysqlmanager debug info in distribution
parent 0c739f3b
...@@ -114,6 +114,14 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR ...@@ -114,6 +114,14 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG
${CMAKE_CXX_FLAGS_DEBUG}) ${CMAKE_CXX_FLAGS_DEBUG})
STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELWITHDEBINFO
${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
STRING(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELWITHDEBINFO
${CMAKE_C_FLAGS_RELWITHDEBINFO})
# generate .map files
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MAP /MAPINFO:EXPORTS")
# remove support for Exception handling # remove support for Exception handling
STRING(REPLACE "/GX" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) STRING(REPLACE "/GX" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
......
...@@ -126,6 +126,15 @@ if [ -e $DESTDIR ] ; then ...@@ -126,6 +126,15 @@ if [ -e $DESTDIR ] ; then
usage usage
fi fi
# ----------------------------------------------------------------------
# Adjust target name if needed, release with debug info has another name
# ----------------------------------------------------------------------
if [ x"$TARGET" = x"release" -a -f "client/relwithdebinfo/mysql.exe" ]
then
TARGET="relwithdebinfo"
fi
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# Copy executables, and client DLL (FIXME why?) # Copy executables, and client DLL (FIXME why?)
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
...@@ -137,7 +146,7 @@ mkdir $DESTDIR/bin ...@@ -137,7 +146,7 @@ mkdir $DESTDIR/bin
cp client/$TARGET/*.exe $DESTDIR/bin/ cp client/$TARGET/*.exe $DESTDIR/bin/
cp extra/$TARGET/*.exe $DESTDIR/bin/ cp extra/$TARGET/*.exe $DESTDIR/bin/
cp storage/myisam/$TARGET/*.exe $DESTDIR/bin/ cp storage/myisam/$TARGET/*.exe $DESTDIR/bin/
cp server-tools/instance-manager/$TARGET/*.exe $DESTDIR/bin/ cp server-tools/instance-manager/$TARGET/*.{exe,map,pdb} $DESTDIR/bin/
cp tests/$TARGET/*.exe $DESTDIR/bin/ cp tests/$TARGET/*.exe $DESTDIR/bin/
cp libmysql/$TARGET/*.exe $DESTDIR/bin/ cp libmysql/$TARGET/*.exe $DESTDIR/bin/
cp libmysql/$TARGET/libmysql.dll $DESTDIR/bin/ cp libmysql/$TARGET/libmysql.dll $DESTDIR/bin/
...@@ -146,6 +155,8 @@ cp libmysql/$TARGET/libmysql.dll $DESTDIR/bin/ ...@@ -146,6 +155,8 @@ cp libmysql/$TARGET/libmysql.dll $DESTDIR/bin/
mv $DESTDIR/bin/comp_err.exe $DESTDIR/bin/comp-err.exe mv $DESTDIR/bin/comp_err.exe $DESTDIR/bin/comp-err.exe
cp sql/$TARGET/mysqld.exe $DESTDIR/bin/mysqld$EXE_SUFFIX.exe cp sql/$TARGET/mysqld.exe $DESTDIR/bin/mysqld$EXE_SUFFIX.exe
cp sql/$TARGET/mysqld.pdb $DESTDIR/bin/mysqld$EXE_SUFFIX.pdb
cp sql/$TARGET/mysqld.map $DESTDIR/bin/mysqld$EXE_SUFFIX.map
if [ x"$PACK_DEBUG" = "" -a -f "sql/debug/mysqld.exe" -o \ if [ x"$PACK_DEBUG" = "" -a -f "sql/debug/mysqld.exe" -o \
x"$PACK_DEBUG" = "yes" ] ; then x"$PACK_DEBUG" = "yes" ] ; then
...@@ -342,6 +353,9 @@ done ...@@ -342,6 +353,9 @@ done
cp -pR sql/share $DESTDIR/ cp -pR sql/share $DESTDIR/
# The SQL initiation code is really expected to be in "share"
mv $DESTDIR/scripts/*.sql $DESTDIR/share/ || true
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# Copy other files specified on command line DEST=SOURCE # Copy other files specified on command line DEST=SOURCE
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
......
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