Add third_party/dragonbox dependency V8 adds a new dependency to the dragonbox library in https://crrev.com/c/6395060. Add this dependency for PDFium as well. Change-Id: Iea04b5e954907f2fdf0285846c845cfb8717eb56 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/132090 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Andy Phan <andyphan@chromium.org>
diff --git a/.gitignore b/.gitignore index 846ec7f..87a0a29 100644 --- a/.gitignore +++ b/.gitignore
@@ -11,6 +11,7 @@ /third_party/clang-format /third_party/cpu_features/src /third_party/depot_tools +/third_party/dragonbox/src /third_party/fast_float/src /third_party/fp16/src /third_party/freetype/src
diff --git a/DEPS b/DEPS index aca1c4a..e6eebab 100644 --- a/DEPS +++ b/DEPS
@@ -108,6 +108,10 @@ # and whatever else without interference from each other. 'depot_tools_revision': '1fcc527019d786502b02f71b8b764ee674a40953', # Three lines of non-changing comments so that + # the commit queue can handle CLs rolling dragonbox + # and whatever else without interference from each other. + 'dragonbox_revision': '6c7c925b571d54486b9ffae8d9d18a822801cbda', + # 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': 'cb1d42aaa1e14b09e1452cfdef373d051b8c02a4', @@ -350,6 +354,12 @@ Var('chromium_git') + '/chromium/tools/depot_tools.git@' + Var('depot_tools_revision'), + 'third_party/dragonbox/src': { + 'url': Var('chromium_git') + '/external/github.com/jk-jeon/dragonbox.git@' + + Var('dragonbox_revision'), + 'condition': 'checkout_v8', + }, + 'third_party/fast_float/src': Var('chromium_git') + '/external/github.com/fastfloat/fast_float.git@' + Var('fast_float_revision'),
diff --git a/third_party/dragonbox/BUILD.gn b/third_party/dragonbox/BUILD.gn new file mode 100644 index 0000000..981be5b --- /dev/null +++ b/third_party/dragonbox/BUILD.gn
@@ -0,0 +1,16 @@ +# Copyright 2025 The PDFium Authors +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +config("dragonbox_config") { + include_dirs = [ "src/include" ] +} + +source_set("dragonbox") { + public = [ "src/include/dragonbox/dragonbox.h" ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + + public_configs = [ ":dragonbox_config" ] +}
diff --git a/third_party/dragonbox/README.pdfium b/third_party/dragonbox/README.pdfium new file mode 100644 index 0000000..1b62483 --- /dev/null +++ b/third_party/dragonbox/README.pdfium
@@ -0,0 +1,15 @@ +Name: dragonbox +URL: https://github.com/jk-jeon/dragonbox +Version: 1.1.3 +Revision: 6c7c925b571d54486b9ffae8d9d18a822801cbda +License: Apache-with-LLVM-Exception, BSL-1.0 +License File: src/LICENSE-Apache2-LLVM, src/LICENSE-Boost +Shipped: yes +Security Critical: yes +CPEPrefix: unknown + +Description: +A fast float-to-string conversion algorithm. + +Local Modifications: +None