Forráskód Böngészése

Added sem_init result. Added mingw executable stripping.

bkaradzic 12 éve
szülő
commit
90e572a74c
2 módosított fájl, 12 hozzáadás és 3 törlés
  1. 4 1
      include/bx/sem.h
  2. 8 2
      premake/toolchain.lua

+ 4 - 1
include/bx/sem.h

@@ -9,6 +9,7 @@
 #include "bx.h"
 
 #if BX_PLATFORM_POSIX
+#	include <errno.h>
 #	include <semaphore.h>
 #	include <time.h>
 #elif BX_PLATFORM_WINDOWS || BX_PLATFORM_XBOX360
@@ -24,7 +25,9 @@ namespace bx
 	public:
 		Semaphore()
 		{
-			sem_init(&m_handle, 0, 0);
+			int32_t result = sem_init(&m_handle, 0, 0);
+			BX_CHECK(0 == result, "sem_init failed. errno %d", errno);
+			BX_UNUSED(result);
 		}
 
 		~Semaphore()

+ 8 - 2
premake/toolchain.lua

@@ -440,13 +440,19 @@ function strip()
 		postbuildcommands {
 			"@echo Stripping symbols.",
 			"@$(ANDROID_NDK_ARM)/bin/arm-linux-androideabi-strip -s \"$(TARGET)\""
-		} 
+		}
 
 	configuration { "linux", "Release" }
 		postbuildcommands {
 			"@echo Stripping symbols.",
 			"@strip -s \"$(TARGET)\""
-		} 
+		}
+
+	configuration { "mingw", "Release" }
+		postbuildcommands {
+			"@echo Stripping symbols.",
+			"@$(MINGW)/bin/strip -s \"$(TARGET)\""
+		}
 
 	configuration { "nacl", "Release" }
 		postbuildcommands {