external/harfbuzz/UnpackedTarball_harfbuzz.mk | 1 + external/harfbuzz/clang-cl.patch | 12 ++++++++++++ 2 files changed, 13 insertions(+)
New commits: commit a5236104672ccbb9f7f9c1b4dc70bea95ca5abf6 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Oct 20 13:28:17 2016 +0200 external/harfbuzz: Silence clang-cl -Werror,-Wmicrosoft-enum-value The code in harfbuzz' src/hb_common.h apparently goes to some length to ensure that any value of type hb_tag_t (aka unit32_t) can be transported as a value of the hb_script_t enum type. However, under MSVC any C (or non-fixed C++) enum type has an underlying type of int, so _HB_SCRIPT_MAX_VALUE of value 0xFFFFFFFF will cause a -Wmicrosoft-enum-value under clang-cl. To not complicate things further, acknowledge that converting between hb_tag_t (an unsigned integer type with 32 value bits) and hb_script_t (a two's-complement signed integer type with 32 value bits) is well-defined under MSVC and drop _HB_SCRIPT_MAX_VALUE (which appears to be an otherwise unused implementation detail) there. Change-Id: Ic03dff64a9dd24683c45347fa78699708c269972 diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk b/external/harfbuzz/UnpackedTarball_harfbuzz.mk index 9a5560f..7d408d2 100644 --- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk +++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk @@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,harfbuzz,0)) $(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \ external/harfbuzz/ubsan.patch \ + external/harfbuzz/clang-cl.patch \ )) ifneq ($(ENABLE_RUNTIME_OPTIMIZATIONS),TRUE) diff --git a/external/harfbuzz/clang-cl.patch b/external/harfbuzz/clang-cl.patch new file mode 100755 index 0000000..5ba4706 --- /dev/null +++ b/external/harfbuzz/clang-cl.patch @@ -0,0 +1,12 @@ +--- src/hb-common.h ++++ src/hb-common.h +@@ -331,7 +331,9 @@ + * + * http://lists.freedesktop.org/archives/harfbuzz/2014-March/004150.html + */ ++#if !defined _MSC_VER /* avoid clang-cl -Wmicrosoft-enum-value */ + _HB_SCRIPT_MAX_VALUE = HB_TAG_MAX, /*< skip >*/ ++#endif + _HB_SCRIPT_MAX_VALUE_SIGNED = HB_TAG_MAX_SIGNED /*< skip >*/ + + } hb_script_t; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits