Add third_party/fast_float dependency Starting with https://crrev.com/c/5790306, V8 requires the fast_float library to do string to double conversions. Add this dependency for PDFium as well. Change-Id: I3a8c7fd01ccff86ba4f23084c53be76259a4b4c3 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/123994 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@google.com> Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/.gitignore b/.gitignore index aa70d5c..1ffe3ee 100644 --- a/.gitignore +++ b/.gitignore
@@ -11,6 +11,7 @@ /third_party/clang-format /third_party/cpu_features/src /third_party/depot_tools +/third_party/fast_float/src /third_party/fp16/src /third_party/freetype/src /third_party/googletest/src
diff --git a/DEPS b/DEPS index 4867ded..9746dd3 100644 --- a/DEPS +++ b/DEPS
@@ -102,6 +102,10 @@ # and whatever else without interference from each other. 'depot_tools_revision': 'caa77da9568fb7c48c9db679cf9dc0ae20080585', # Three lines of non-changing comments so that + # the commit queue can handle CLs rolling fast_float + # and whatever else without interference from each other. + 'fast_float_revision': '3e57d8dcfb0a04b5a8a26b486b54490a2e9b310f', + # Three lines of non-changing comments so that # the commit queue can handle CLs rolling fp16 # and whatever else without interference from each other. 'fp16_revision': '581ac1c79dd9d9f6f4e8b2934e7a55c7becf0799', @@ -328,6 +332,10 @@ Var('chromium_git') + '/chromium/tools/depot_tools.git@' + Var('depot_tools_revision'), + 'third_party/fast_float/src': + Var('chromium_git') + '/external/github.com/fastfloat/fast_float.git@' + + Var('fast_float_revision'), + 'third_party/fp16/src': Var('chromium_git') + '/external/github.com/Maratyszcza/FP16.git@' + Var('fp16_revision'),
diff --git a/third_party/fast_float/BUILD.gn b/third_party/fast_float/BUILD.gn new file mode 100644 index 0000000..5ee373d --- /dev/null +++ b/third_party/fast_float/BUILD.gn
@@ -0,0 +1,18 @@ +# Copyright 2024 The PDFium Authors +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/gclient_args.gni") + +config("fast_float_config") { + include_dirs = [ "src/include" ] +} + +source_set("fast_float") { + public = [ "src/include/fast_float/fast_float.h" ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + + public_configs = [ ":fast_float_config" ] +}
diff --git a/third_party/fast_float/README.pdfium b/third_party/fast_float/README.pdfium new file mode 100644 index 0000000..4b58ec0 --- /dev/null +++ b/third_party/fast_float/README.pdfium
@@ -0,0 +1,15 @@ +Name: fast_float +URL: https://github.com/fastfloat/fast_float +Version: 6.1.4 +Revision: d7417618f93d2c47e9bbde561510f9fc8bafe003 +License: MIT +License File: src/LICENSE-MIT +Shipped: yes +Security Critical: yes +CPEPrefix: unknown + +Description: +Fast, header-only implementation of char* to float/double conversions. + +Local Modifications: +None