Commits

Martín Lucas Golini  committed 4d4621e

Fixed Issue #17.
The symbols are now stripped only if is explicited in the premake4 call with --strip-symbols.

  • Participants
  • Parent commits 93f31bb

Comments (0)

Files changed (2)

File premake4.lua

 newoption { trigger = "verbose", description = "Build efsw with verbose mode." }
+newoption { trigger = "strip-symbols", description = "Strip debugging symbols in other file ( only for relwithdbginfo configuration )." }
 
 efsw_major_version	= "1"
 efsw_minor_version	= "0"
 			
 			if os.is("linux") or os.is("bsd") or os.is("haiku") then
 				targetextension ( ".so." .. efsw_version )
-				postbuildcommands{ "sh ../../project/build.reldbginfo.sh " .. efsw_major_version .. " " .. efsw_minor_version .. " " .. efsw_patch_version }
+				postbuildcommands { "sh ../../project/build.reldbginfo.sh " .. efsw_major_version .. " " .. efsw_minor_version .. " " .. efsw_patch_version .. " " .. iif( _OPTIONS["strip-symbols"], "strip-symbols", "" ) }
 			end

File project/build.reldbginfo.sh

 ln -s libefsw.so.$1.$2.$3 libefsw.so.$1
 ln -s libefsw.so.$1 libefsw.so
 
-objcopy --only-keep-debug libefsw.so.$1.$2.$3 libefsw.debug
-objcopy --strip-debug libefsw.so.$1.$2.$3
+if [ "$4" == "strip-symbols" ]; then
+	objcopy --only-keep-debug libefsw.so.$1.$2.$3 libefsw.debug
+	objcopy --strip-debug libefsw.so.$1.$2.$3
+fi