Sfoglia il codice sorgente

fixed HL_NO_OPT on clang

Nicolas Cannasse 7 anni fa
parent
commit
5ee6be73a0
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  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