office-gobmx/external/pdfium
Stephan Bergmann a2fad16357 external/pdfium: Adapt bundled abseil-cpp to Clang 15 trunk change
...<5ea341d7c4>
"[clang] Fix trivially copyable for copy constructor and copy assignment
operator", which caused my build on Windows with clang-cl against the MSVC
standard library to fail with

> In file included from workdir/UnpackedTarball/pdfium/core/fxge/win32/cgdi_plus_ext.cpp:19:
> In file included from workdir/UnpackedTarball/pdfium\core/fxcrt/fx_string.h:14:
> In file included from workdir/UnpackedTarball/pdfium\core/fxcrt/bytestring.h:23:
> In file included from workdir/UnpackedTarball/pdfium\core/fxcrt/string_view_template.h:18:
> In file included from workdir/UnpackedTarball/pdfium\third_party/abseil-cpp/absl/types/optional.h:39:
> In file included from workdir/UnpackedTarball/pdfium/third_party/abseil-cpp\absl/utility/utility.h:51:
> workdir/UnpackedTarball/pdfium/third_party/abseil-cpp\absl/meta/type_traits.h(501,3): error: static_assert failed due to requirement 'compliant || std::is_trivially_copy_assignable<std::pair<unsigned long long, unsigned long long>>::value' "Not compliant with std::is_trivially_copy_assignable; Standard: false, Implementation: true"
>   static_assert(compliant || std::is_trivially_copy_assignable<T>::value,
>   ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> workdir/UnpackedTarball/pdfium/third_party/abseil-cpp\absl/types/internal/optional.h(175,21): note: in instantiation of template class 'absl::is_trivially_copy_assignable<std::pair<unsigned long long, unsigned long long>>' requested here
>               absl::is_trivially_copy_assignable<typename std::remove_cv<
>                     ^
> workdir/UnpackedTarball/pdfium\third_party/abseil-cpp/absl/types/optional.h(119,45): note: in instantiation of default argument for 'optional_data<std::pair<unsigned long long, unsigned long long>>' required here
> class optional : private optional_internal::optional_data<T>,
>                                             ^~~~~~~~~~~~~~~~
> workdir/UnpackedTarball/pdfium/core/fxge/win32/cgdi_plus_ext.cpp(384,43): note: in instantiation of template class 'absl::optional<std::pair<unsigned long long, unsigned long long>>' requested here
> absl::optional<std::pair<size_t, size_t>> IsSmallTriangle(
>                                           ^

because the behavior of Clang's built-in __has_trivial_assign no longer matches
the behavior of std::is_trivially_copy_assignable for std::pair, which in MSVC
happens to be implemented with a deleted copy assignment op

>     pair& operator=(const volatile pair&) = delete;

in
c:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/include/utility.

(See the comments starting at <https://reviews.llvm.org/D127593#3596601>
"[clang] Fix trivially copyable for copy constructor and copy assignment
operator" for further details.)

The easiest workaround appears to be to switch the implementation of
absl::is_trivially_copy_assignable from __has_trivial_assign to
std::is_trivially_copy_assignable, which should always be available in our
C++17-based toolchain baselines.

Change-Id: I5d9c3c4fd95852e57d93b56752b7e64d6d71d153
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136335
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-23 15:27:13 +02:00
..
inc/pch
abseil-trivial.patch external/pdfium: Adapt bundled abseil-cpp to Clang 15 trunk change 2022-06-23 15:27:13 +02:00
AndroidNDK19.patch.1
build.patch.1
c++20-comparison.patch
cg-instead-of-carbon.patch.1
gcc-c++20-comparison.patch
include.patch Missing #include <stdint.h> in various external code 2022-05-23 12:08:30 +02:00
Library_pdfium.mk
Makefile
Module_pdfium.mk
README
ubsan.patch
UnpackedTarball_pdfium.mk external/pdfium: Adapt bundled abseil-cpp to Clang 15 trunk change 2022-06-23 15:27:13 +02:00
windows7.patch.1

External package containing pdfium.

"Insert -> Picture -> From File..." uses this library when a PDF file is
selected.

https://pdfium.googlesource.com/pdfium/

How to update the tarball:

version=$(git for-each-ref|grep chromium/|tail -n 1|sed 's|.*/||')
git checkout --track origin/chromium/$version
gclient sync
git archive --prefix=pdfium/ --format=tar origin/chromium/${version} > pdfium-${version}.tar
(cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/third_party/freetype/src/include/ pdfium/third_party/freetype/src/src/)
(cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/third_party/abseil-cpp/absl/)
(cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/build/build_config.h pdfium/build/buildflag.h)
bzip2 pdfium-${version}.tar