소스 검색

Don't fail for Clang builds, which pretend to be an ancient GCC.

Reported by pkubaj.
Mike Pall 2 년 전
부모
커밋
a4f4f5b835
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      src/lj_arch.h

+ 6 - 0
src/lj_arch.h

@@ -466,11 +466,17 @@
 #endif
 #endif
 #endif
 #endif
 #elif !LJ_TARGET_PS3
 #elif !LJ_TARGET_PS3
+#if __clang__
+#if ((__clang_major__ < 3) || ((__clang_major__ == 3) && __clang_minor__ < 5))
+#error "Need at least Clang 3.5 or newer"
+#endif
+#else
 #if (__GNUC__ < 4) || ((__GNUC__ == 4) && __GNUC_MINOR__ < 3)
 #if (__GNUC__ < 4) || ((__GNUC__ == 4) && __GNUC_MINOR__ < 3)
 #error "Need at least GCC 4.3 or newer"
 #error "Need at least GCC 4.3 or newer"
 #endif
 #endif
 #endif
 #endif
 #endif
 #endif
+#endif
 
 
 /* Check target-specific constraints. */
 /* Check target-specific constraints. */
 #ifndef _BUILDVM_H
 #ifndef _BUILDVM_H