Browse Source

fixed HL_NO_OPT on clang

Nicolas Cannasse 7 năm trước cách đây
mục cha
commit
5ee6be73a0
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  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