diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-12-01 12:38:14 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-12-02 08:02:26 +0100 |
commit | 7ae1c3520a607ee7b542b5eeaae3d1d0a7e6f362 (patch) | |
tree | b857606c69ce911f90e6c7747c908e5541f159aa | |
parent | abe87fdfe766a9ec0ab9a5b844bc7a400cfe5b2f (diff) |
external/glm: work around missing clang-cl #pragma support
Change-Id: I596dc0e2306e7170e65c77a1635f88407272e6b1
-rw-r--r-- | external/glm/UnpackedTarball_glm.mk | 1 | ||||
-rw-r--r-- | external/glm/clang-cl.patch.0 | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/external/glm/UnpackedTarball_glm.mk b/external/glm/UnpackedTarball_glm.mk index f59325414d8c..71f1c3cd8ff8 100644 --- a/external/glm/UnpackedTarball_glm.mk +++ b/external/glm/UnpackedTarball_glm.mk @@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,glm, \ external/glm/Wshadow-patch-fix.patch \ external/glm/Wsign-compare.patch.0 \ external/glm/Wunused-parameter.patch \ + external/glm/clang-cl.patch.0 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/glm/clang-cl.patch.0 b/external/glm/clang-cl.patch.0 new file mode 100644 index 000000000000..9e3afc97fa1c --- /dev/null +++ b/external/glm/clang-cl.patch.0 @@ -0,0 +1,14 @@ +# "#pragma intrinsic" not (yet?) handled in the "if (LangOpts.MicrosoftExt)" +# block in Preprocessor::RegisterBuiltinPragmas in Clang's lib/Lex/Pragma.cpp: +--- glm/core/func_integer.inl ++++ glm/core/func_integer.inl +@@ -29,7 +29,9 @@ + #if(GLM_ARCH != GLM_ARCH_PURE)
+ #if(GLM_COMPILER & GLM_COMPILER_VC)
+ # include <intrin.h>
++#if !defined __clang__
+ # pragma intrinsic(_BitScanReverse)
++#endif
+ #endif//(GLM_COMPILER & GLM_COMPILER_VC)
+ #endif//(GLM_ARCH != GLM_ARCH_PURE)
+
|