Explorar o código

fixed HL_NO_OPT on clang

Nicolas Cannasse %!s(int64=7) %!d(string=hai) anos
pai
achega
5ee6be73a0
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      src/hl.h

+ 5 - 1
src/hl.h

@@ -776,7 +776,11 @@ typedef struct {
 #endif
 
 #if defined(HL_GCC) && !defined(HL_CONSOLE)
-#	define HL_NO_OPT __attribute__((optimize("-O0")))
+#	ifdef HL_CLANG
+#		define HL_NO_OPT	__attribute__ ((optnone))
+#	else
+#		define HL_NO_OPT	__attribute__((optimize("-O0")))
+#	endif
 #else
 #	define HL_NO_OPT
 #endif