aboutsummaryrefslogtreecommitdiff
path: root/ports/chromium-base/res
diff options
context:
space:
mode:
authorMartin Vejdarski <extrulm@gmail.com>2020-09-06 04:50:30 +0200
committerGitHub <noreply@github.com>2020-09-05 19:50:30 -0700
commitf7cd54fcd4d99be697b6cfb3d4edaf08c3412338 (patch)
tree7615b9928eed51769b70fdc833628c3bba8c51e5 /ports/chromium-base/res
parentfdac1fc5aa36e8edeb9f358f0fad041de2626215 (diff)
downloadvcpkg-f7cd54fcd4d99be697b6cfb3d4edaf08c3412338.tar.gz
vcpkg-f7cd54fcd4d99be697b6cfb3d4edaf08c3412338.zip
[chromium-base] Add new port (#12396)
Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: Huahua <ihuahua@live.com>
Diffstat (limited to 'ports/chromium-base/res')
-rw-r--r--ports/chromium-base/res/.gn1
-rw-r--r--ports/chromium-base/res/0001-base.patch101
-rw-r--r--ports/chromium-base/res/0002-build.patch144
-rw-r--r--ports/chromium-base/res/BUILD.gn5
-rw-r--r--ports/chromium-base/res/LASTCHANGE.committime1
-rw-r--r--ports/chromium-base/res/build_overrides/build.gni16
-rw-r--r--ports/chromium-base/res/fontconfig/BUILD.gn1
-rw-r--r--ports/chromium-base/res/gclient_args.gni7
-rw-r--r--ports/chromium-base/res/icu/BUILD.gn2
-rw-r--r--ports/chromium-base/res/icu/config.gni3
-rw-r--r--ports/chromium-base/res/libxml/BUILD.gn2
-rw-r--r--ports/chromium-base/res/protobuf/proto_library.gni0
-rw-r--r--ports/chromium-base/res/test_fonts/BUILD.gn1
-rw-r--r--ports/chromium-base/res/testing/gmock/BUILD.gn1
-rw-r--r--ports/chromium-base/res/testing/gtest/BUILD.gn1
-rw-r--r--ports/chromium-base/res/testing/libfuzzer/fuzzer_test.gni1
-rw-r--r--ports/chromium-base/res/testing/test.gni20
-rw-r--r--ports/chromium-base/res/tools/win/DebugVisualizers/BUILD.gn1
-rw-r--r--ports/chromium-base/res/tools/win/DebugVisualizers/chrome.natvis0
19 files changed, 308 insertions, 0 deletions
diff --git a/ports/chromium-base/res/.gn b/ports/chromium-base/res/.gn
new file mode 100644
index 000000000..4fcb7c405
--- /dev/null
+++ b/ports/chromium-base/res/.gn
@@ -0,0 +1 @@
+buildconfig = "//build/config/BUILDCONFIG.gn" \ No newline at end of file
diff --git a/ports/chromium-base/res/0001-base.patch b/ports/chromium-base/res/0001-base.patch
new file mode 100644
index 000000000..ca8c05975
--- /dev/null
+++ b/ports/chromium-base/res/0001-base.patch
@@ -0,0 +1,101 @@
+diff --git a/BUILD.gn b/BUILD.gn
+index 7b7cd51..2961688 100644
+--- a/BUILD.gn
++++ b/BUILD.gn
+@@ -155,6 +155,7 @@ if (is_android) {
+ # test code (test support and anything in the test directory) which should use
+ # source_set as is recommended for GN targets).
+ jumbo_component("base") {
++ output_name = "chromium_base"
+ if (is_nacl || is_ios) {
+ # Link errors related to malloc functions if libbase for nacl is
+ # compiled with jumbo: https://crbug.com/775959.
+@@ -162,6 +163,11 @@ jumbo_component("base") {
+ never_build_jumbo = true
+ }
+
++ if (!is_component_build) {
++ complete_static_lib = true
++ configs -= [ "//build/config/compiler:thin_archive" ]
++ }
++
+ sources = [
+ "allocator/allocator_check.cc",
+ "allocator/allocator_check.h",
+@@ -1638,7 +1644,7 @@ jumbo_component("base") {
+ "hash/md5_constexpr_internal.h",
+ "hash/sha1.h",
+ ]
+- if (is_nacl) {
++ if (true) {
+ sources += [
+ "hash/md5_nacl.cc",
+ "hash/md5_nacl.h",
+@@ -2298,6 +2304,7 @@ buildflag_header("tracing_buildflags") {
+ # library. Note that this library cannot depend on base because base depends on
+ # base_static.
+ static_library("base_static") {
++ output_name = "chromium_base_static"
+ sources = [
+ "base_switches.cc",
+ "base_switches.h",
+@@ -2325,7 +2332,7 @@ static_library("base_static") {
+ }
+
+ component("i18n") {
+- output_name = "base_i18n"
++ output_name = "chromium_base_i18n"
+ sources = [
+ "i18n/base_i18n_export.h",
+ "i18n/base_i18n_switches.cc",
+diff --git a/gtest_prod_util.h b/gtest_prod_util.h
+index 2ca267e..0a0b6df 100644
+--- a/gtest_prod_util.h
++++ b/gtest_prod_util.h
+@@ -5,7 +5,8 @@
+ #ifndef BASE_GTEST_PROD_UTIL_H_
+ #define BASE_GTEST_PROD_UTIL_H_
+
+-#include "testing/gtest/include/gtest/gtest_prod.h" // nogncheck
++#define FRIEND_TEST(test_case_name, test_name)\
++friend class test_case_name##_##test_name##_Test
+
+ // This is a wrapper for gtest's FRIEND_TEST macro that friends
+ // test with all possible prefixes. This is very helpful when changing the test
+diff --git a/hash/md5.h b/hash/md5.h
+index 8a49f08..24acdab 100644
+--- a/hash/md5.h
++++ b/hash/md5.h
+@@ -11,7 +11,7 @@
+ #include "base/strings/string_piece.h"
+ #include "build/build_config.h"
+
+-#if defined(OS_NACL)
++#if true
+ #include "base/hash/md5_nacl.h"
+ #else
+ #include "base/hash/md5_boringssl.h"
+diff --git a/hash/md5_nacl.cc b/hash/md5_nacl.cc
+index 827bbbd..4b22c59 100644
+--- a/hash/md5_nacl.cc
++++ b/hash/md5_nacl.cc
+@@ -22,6 +22,7 @@
+ */
+
+ #include <stddef.h>
++#include <string.h>
+
+ #include "base/hash/md5.h"
+
+diff --git a/profiler/stack_copier_signal.cc b/profiler/stack_copier_signal.cc
+index 5a7d8b9..f959f2f 100644
+--- a/profiler/stack_copier_signal.cc
++++ b/profiler/stack_copier_signal.cc
+@@ -6,6 +6,7 @@
+
+ #include <linux/futex.h>
+ #include <signal.h>
++#include <string.h>
+ #include <sys/ucontext.h>
+ #include <syscall.h>
+
diff --git a/ports/chromium-base/res/0002-build.patch b/ports/chromium-base/res/0002-build.patch
new file mode 100644
index 000000000..94568d169
--- /dev/null
+++ b/ports/chromium-base/res/0002-build.patch
@@ -0,0 +1,144 @@
+diff --git a/config/BUILDCONFIG.gn b/config/BUILDCONFIG.gn
+index 4cc6bfc..9ea83a9 100644
+--- a/config/BUILDCONFIG.gn
++++ b/config/BUILDCONFIG.gn
+@@ -657,6 +657,7 @@ template("component") {
+ # See http://crbug.com/594610
+ forward_variables_from(invoker, [ "visibility" ])
+ forward_variables_from(invoker, "*", [ "visibility" ])
++ not_needed("*")
+ }
+ }
+
+diff --git a/config/clang/BUILD.gn b/config/clang/BUILD.gn
+index 960726e..87886dc 100644
+--- a/config/clang/BUILD.gn
++++ b/config/clang/BUILD.gn
+@@ -38,5 +38,7 @@ config("extra_warnings") {
+ "-Wstring-conversion",
+
+ "-Wtautological-overlap-compare",
++ "-Wno-unknown-warning-option",
++ "-Wno-unknown-pragmas"
+ ]
+ }
+diff --git a/config/mac/sdk_info.py b/config/mac/sdk_info.py
+index 1ad11d3..99b21f9 100644
+--- a/config/mac/sdk_info.py
++++ b/config/mac/sdk_info.py
+@@ -61,10 +61,15 @@ def FillXcodeVersion(settings, developer_dir):
+ settings['xcode_build'] = version_plist['ProductBuildVersion']
+ return
+
+- lines = subprocess.check_output(['xcodebuild', '-version']).splitlines()
+- settings['xcode_version'] = FormatVersion(lines[0].split()[-1])
+- settings['xcode_version_int'] = int(settings['xcode_version'], 10)
+- settings['xcode_build'] = lines[-1].split()[-1]
++ try:
++ lines = subprocess.check_output(['xcodebuild', '-version']).splitlines()
++ settings['xcode_version'] = FormatVersion(lines[0].split()[-1])
++ settings['xcode_version_int'] = int(settings['xcode_version'], 10)
++ settings['xcode_build'] = lines[-1].split()[-1]
++ except:
++ settings['xcode_version'] = ""
++ settings['xcode_version_int'] = 0
++ settings['xcode_build'] = ""
+
+
+ def FillMachineOSBuild(settings):
+diff --git a/mac/find_sdk.py b/mac/find_sdk.py
+index 58362bf..a6069b6 100755
+--- a/mac/find_sdk.py
++++ b/mac/find_sdk.py
+@@ -68,6 +68,8 @@ def main():
+ dev_dir = out.rstrip()
+ sdk_dir = os.path.join(
+ dev_dir, 'Platforms/MacOSX.platform/Developer/SDKs')
++ if not os.path.isdir(sdk_dir):
++ sdk_dir = os.path.join(dev_dir, 'SDKs')
+
+ if not os.path.isdir(sdk_dir):
+ raise SdkError('Install Xcode, launch it, accept the license ' +
+@@ -87,7 +89,10 @@ def main():
+
+ if options.print_bin_path:
+ bin_path = 'Toolchains/XcodeDefault.xctoolchain/usr/bin/'
+- print(os.path.join(dev_dir, bin_path))
++ if os.path.isdir(os.path.join(dev_dir, bin_path)):
++ print(os.path.join(dev_dir, bin_path))
++ else:
++ print(os.path.join(dev_dir, 'usr/bin/'))
+
+ return best_sdk
+
+diff --git a/toolchain/mac/BUILD.gn b/toolchain/mac/BUILD.gn
+index 8fdada0..8d5e6b7 100644
+--- a/toolchain/mac/BUILD.gn
++++ b/toolchain/mac/BUILD.gn
+@@ -184,9 +184,9 @@ template("mac_toolchain") {
+ # If dSYMs are enabled, this flag will be added to the link tools.
+ if (_enable_dsyms) {
+ dsym_switch = " -Wcrl,dsym,{{root_out_dir}} "
+- dsym_switch += "-Wcrl,dsymutilpath," +
+- rebase_path("//tools/clang/dsymutil/bin/dsymutil",
+- root_build_dir) + " "
++ # dsym_switch += "-Wcrl,dsymutilpath," +
++ # rebase_path("//tools/clang/dsymutil/bin/dsymutil",
++ # root_build_dir) + " "
+
+ dsym_output_dir =
+ "{{root_out_dir}}/{{target_output_name}}{{output_extension}}.dSYM"
+diff --git a/toolchain/win/BUILD.gn b/toolchain/win/BUILD.gn
+index be08930..04fb374 100644
+--- a/toolchain/win/BUILD.gn
++++ b/toolchain/win/BUILD.gn
+@@ -98,7 +98,7 @@ template("msvc_toolchain") {
+ } else {
+ lld_link = "lld-link"
+ }
+- prefix = rebase_path("$clang_base_path/bin", root_build_dir)
++ prefix = "$clang_base_path/bin"
+
+ # lld-link includes a replacement for lib.exe that can produce thin
+ # archives and understands bitcode (for lto builds).
+@@ -190,7 +190,7 @@ template("msvc_toolchain") {
+ # amount of data to parse and store in .ninja_deps. We do this on non-Windows too,
+ # and already make sure rebuilds after win sdk / libc++ / clang header updates happen via
+ # changing commandline flags.
+- show_includes = "/showIncludes:user"
++ show_includes = ""
+ } else {
+ show_includes = "/showIncludes"
+ }
+@@ -235,7 +235,7 @@ template("msvc_toolchain") {
+
+ if (toolchain_args.current_cpu == "arm64") {
+ if (is_clang) {
+- prefix = rebase_path("$clang_base_path/bin", root_build_dir)
++ prefix = "$clang_base_path/bin"
+ ml = "${clang_prefix}${prefix}/${clang_cl} --target=arm64-windows"
+ if (host_os == "win") {
+ # Flip the slashes so that copy/paste of the command works.
+@@ -444,11 +444,9 @@ template("win_toolchains") {
+
+ msvc_toolchain("win_clang_" + target_name) {
+ environment = "environment." + toolchain_arch
+- prefix = rebase_path("$clang_base_path/bin", root_build_dir)
++ prefix = "$clang_base_path/bin"
+ cl = "${clang_prefix}$prefix/${clang_cl}"
+- _clang_lib_dir =
+- rebase_path("$clang_base_path/lib/clang/$clang_version/lib/windows",
+- root_build_dir)
++ _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib/windows"
+ if (host_os == "win") {
+ # Flip the slashes so that copy/paste of the command works.
+ cl = string_replace(cl, "/", "\\")
+@@ -459,7 +457,7 @@ template("win_toolchains") {
+
+ sys_include_flags = "${win_toolchain_data.include_flags_imsvc}"
+ sys_lib_flags =
+- "-libpath:$_clang_lib_dir ${win_toolchain_data.libpath_flags}"
++ "-libpath:\"$_clang_lib_dir\" ${win_toolchain_data.libpath_flags}"
+
+ toolchain_args = {
+ if (defined(invoker.toolchain_args)) {
diff --git a/ports/chromium-base/res/BUILD.gn b/ports/chromium-base/res/BUILD.gn
new file mode 100644
index 000000000..01d935ba0
--- /dev/null
+++ b/ports/chromium-base/res/BUILD.gn
@@ -0,0 +1,5 @@
+static_library("chromium-base") {
+ deps = [
+ "//base",
+ ]
+}
diff --git a/ports/chromium-base/res/LASTCHANGE.committime b/ports/chromium-base/res/LASTCHANGE.committime
new file mode 100644
index 000000000..6acbbf691
--- /dev/null
+++ b/ports/chromium-base/res/LASTCHANGE.committime
@@ -0,0 +1 @@
+1594430814 \ No newline at end of file
diff --git a/ports/chromium-base/res/build_overrides/build.gni b/ports/chromium-base/res/build_overrides/build.gni
new file mode 100644
index 000000000..47ac03644
--- /dev/null
+++ b/ports/chromium-base/res/build_overrides/build.gni
@@ -0,0 +1,16 @@
+import("//build/config/gclient_args.gni")
+
+# Some non-Chromium builds don't support building java targets.
+enable_java_templates = true
+
+# Don't use Chromium's third_party/binutils.
+linux_use_bundled_binutils_override = false
+
+# Tracing requires //third_party/perfetto.
+enable_base_tracing = false
+
+# Skip assertions about 4GiB file size limit. See https://crbug.com/648948.
+ignore_elf32_limitations = false
+
+# Use the system install of Xcode for tools like ibtool, libtool, etc.
+use_system_xcode = true
diff --git a/ports/chromium-base/res/fontconfig/BUILD.gn b/ports/chromium-base/res/fontconfig/BUILD.gn
new file mode 100644
index 000000000..5c26eaf19
--- /dev/null
+++ b/ports/chromium-base/res/fontconfig/BUILD.gn
@@ -0,0 +1 @@
+component("fontconfig") {} \ No newline at end of file
diff --git a/ports/chromium-base/res/gclient_args.gni b/ports/chromium-base/res/gclient_args.gni
new file mode 100644
index 000000000..bd1145a79
--- /dev/null
+++ b/ports/chromium-base/res/gclient_args.gni
@@ -0,0 +1,7 @@
+build_with_chromium = true
+checkout_android = false
+checkout_android_native_support = false
+checkout_ios_webkit = false
+checkout_nacl = false
+checkout_oculus_sdk = false
+checkout_openxr = false \ No newline at end of file
diff --git a/ports/chromium-base/res/icu/BUILD.gn b/ports/chromium-base/res/icu/BUILD.gn
new file mode 100644
index 000000000..22356981f
--- /dev/null
+++ b/ports/chromium-base/res/icu/BUILD.gn
@@ -0,0 +1,2 @@
+component("icuuc") {}
+component("icu") {} \ No newline at end of file
diff --git a/ports/chromium-base/res/icu/config.gni b/ports/chromium-base/res/icu/config.gni
new file mode 100644
index 000000000..4e9ad6a5e
--- /dev/null
+++ b/ports/chromium-base/res/icu/config.gni
@@ -0,0 +1,3 @@
+declare_args() {
+ icu_use_data_file = false
+} \ No newline at end of file
diff --git a/ports/chromium-base/res/libxml/BUILD.gn b/ports/chromium-base/res/libxml/BUILD.gn
new file mode 100644
index 000000000..b48056ab8
--- /dev/null
+++ b/ports/chromium-base/res/libxml/BUILD.gn
@@ -0,0 +1,2 @@
+component("libxml_utils") {}
+component("xml_reader") {} \ No newline at end of file
diff --git a/ports/chromium-base/res/protobuf/proto_library.gni b/ports/chromium-base/res/protobuf/proto_library.gni
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/ports/chromium-base/res/protobuf/proto_library.gni
diff --git a/ports/chromium-base/res/test_fonts/BUILD.gn b/ports/chromium-base/res/test_fonts/BUILD.gn
new file mode 100644
index 000000000..b95c104e1
--- /dev/null
+++ b/ports/chromium-base/res/test_fonts/BUILD.gn
@@ -0,0 +1 @@
+component("test_fonts") {} \ No newline at end of file
diff --git a/ports/chromium-base/res/testing/gmock/BUILD.gn b/ports/chromium-base/res/testing/gmock/BUILD.gn
new file mode 100644
index 000000000..acd0ec30c
--- /dev/null
+++ b/ports/chromium-base/res/testing/gmock/BUILD.gn
@@ -0,0 +1 @@
+component("gmock") {} \ No newline at end of file
diff --git a/ports/chromium-base/res/testing/gtest/BUILD.gn b/ports/chromium-base/res/testing/gtest/BUILD.gn
new file mode 100644
index 000000000..2463cc7c0
--- /dev/null
+++ b/ports/chromium-base/res/testing/gtest/BUILD.gn
@@ -0,0 +1 @@
+component("gtest") {} \ No newline at end of file
diff --git a/ports/chromium-base/res/testing/libfuzzer/fuzzer_test.gni b/ports/chromium-base/res/testing/libfuzzer/fuzzer_test.gni
new file mode 100644
index 000000000..6e2a4c20f
--- /dev/null
+++ b/ports/chromium-base/res/testing/libfuzzer/fuzzer_test.gni
@@ -0,0 +1 @@
+import("//testing/test.gni") \ No newline at end of file
diff --git a/ports/chromium-base/res/testing/test.gni b/ports/chromium-base/res/testing/test.gni
new file mode 100644
index 000000000..2d6f8c103
--- /dev/null
+++ b/ports/chromium-base/res/testing/test.gni
@@ -0,0 +1,20 @@
+template("test") {
+ not_needed(invoker, "*")
+ not_needed("*")
+}
+
+set_defaults("test") {
+ configs = [
+ "//build/config/compiler:chromium_code"
+ ]
+}
+
+template("fuzzer_test") {
+ not_needed(invoker, "*")
+ not_needed("*")
+}
+
+template("protoc_convert") {
+ not_needed(invoker, "*")
+ not_needed("*")
+} \ No newline at end of file
diff --git a/ports/chromium-base/res/tools/win/DebugVisualizers/BUILD.gn b/ports/chromium-base/res/tools/win/DebugVisualizers/BUILD.gn
new file mode 100644
index 000000000..5c2c1f68e
--- /dev/null
+++ b/ports/chromium-base/res/tools/win/DebugVisualizers/BUILD.gn
@@ -0,0 +1 @@
+config("chrome") {} \ No newline at end of file
diff --git a/ports/chromium-base/res/tools/win/DebugVisualizers/chrome.natvis b/ports/chromium-base/res/tools/win/DebugVisualizers/chrome.natvis
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/ports/chromium-base/res/tools/win/DebugVisualizers/chrome.natvis