Browse Source

[godot] Enable address sanitizer in debug builds.

Mario Zechner 2 years ago
parent
commit
7c285d6a3a

+ 1 - 1
spine-godot/.idea/tools/External Tools.xml

@@ -2,7 +2,7 @@
   <tool name="scons build macOS/Linux" showInMainMenu="false" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
   <tool name="scons build macOS/Linux" showInMainMenu="false" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
     <exec>
     <exec>
       <option name="COMMAND" value="scons" />
       <option name="COMMAND" value="scons" />
-      <option name="PARAMETERS" value="target=debug custom_modules=&quot;../spine_godot&quot; -j8" />
+      <option name="PARAMETERS" value="target=debug use_asan=true custom_modules=&quot;../spine_godot&quot; -j8" />
       <option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
       <option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
     </exec>
     </exec>
   </tool>
   </tool>

+ 2 - 2
spine-godot/.idea/workspace.xml

@@ -91,7 +91,7 @@
         <option name="com.jetbrains.cidr.cpp.gradle.execution.GradleNativeBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
         <option name="com.jetbrains.cidr.cpp.gradle.execution.GradleNativeBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
       </method>
       </method>
     </configuration>
     </configuration>
-    <configuration name="godot debug Linux" type="CLionExternalRunConfiguration" factoryName="Application" PROGRAM_PARAMS="--editor --path $ProjectFileDir$/../example" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="godot" TARGET_NAME="scons debug macOS/Linux" CONFIG_NAME="scons debug macOS/Linux" RUN_PATH="$PROJECT_DIR$/bin/godot.linux.tools.64">
+    <configuration name="godot debug Linux" type="CLionExternalRunConfiguration" factoryName="Application" PROGRAM_PARAMS="--editor --path $ProjectFileDir$/../example" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="godot" TARGET_NAME="scons debug macOS/Linux" CONFIG_NAME="scons debug macOS/Linux" RUN_PATH="$PROJECT_DIR$/bin/godot.linux.tools.64s">
       <method v="2">
       <method v="2">
         <option name="CLION.EXTERNAL.BUILD" enabled="true" />
         <option name="CLION.EXTERNAL.BUILD" enabled="true" />
       </method>
       </method>
@@ -101,7 +101,7 @@
         <option name="CLION.EXTERNAL.BUILD" enabled="true" />
         <option name="CLION.EXTERNAL.BUILD" enabled="true" />
       </method>
       </method>
     </configuration>
     </configuration>
-    <configuration name="godot debug macOS" type="CLionExternalRunConfiguration" factoryName="Application" PROGRAM_PARAMS="--editor --path $ProjectFileDir$/../example" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="godot" TARGET_NAME="scons debug macOS/Linux" CONFIG_NAME="scons debug macOS/Linux" RUN_PATH="$PROJECT_DIR$/bin/godot.osx.tools.64">
+    <configuration name="godot debug macOS" type="CLionExternalRunConfiguration" factoryName="Application" PROGRAM_PARAMS="--editor --path $ProjectFileDir$/../example" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="godot" TARGET_NAME="scons debug macOS/Linux" CONFIG_NAME="scons debug macOS/Linux" RUN_PATH="$PROJECT_DIR$/bin/godot.osx.tools.64s">
       <method v="2">
       <method v="2">
         <option name="CLION.EXTERNAL.BUILD" enabled="true" />
         <option name="CLION.EXTERNAL.BUILD" enabled="true" />
       </method>
       </method>

+ 1 - 1
spine-godot/build/build.sh

@@ -60,7 +60,7 @@ else
 	if [ "$OSTYPE" = "msys" ]; then
 	if [ "$OSTYPE" = "msys" ]; then
 		target="$target vsproj=yes livepp=$LIVEPP"
 		target="$target vsproj=yes livepp=$LIVEPP"
 	fi
 	fi
-	scons $target compiledb=yes custom_modules="../spine_godot" --jobs=$cpus	
+	scons $target compiledb=yes use_asan=yes custom_modules="../spine_godot" --jobs=$cpus	
 	if [ -f "bin/godot.x11.opt.tools.64" ]; then
 	if [ -f "bin/godot.x11.opt.tools.64" ]; then
 		strip bin/godot.x11.opt.tools.64
 		strip bin/godot.x11.opt.tools.64
 		chmod a+x bin/godot.x11.opt.tools.64
 		chmod a+x bin/godot.x11.opt.tools.64