Skip to content

Commit

Permalink
Update build configurations to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed May 13, 2020
1 parent ac15151 commit 1445180
Show file tree
Hide file tree
Showing 419 changed files with 19,400 additions and 397,076 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
/out/
/third_party/llvm-build/
/third_party/node-*/
/build/linux/debian_stretch_amd64-sysroot/
/build/linux/debian_stretch_i386-sysroot/
/build/linux/debian_stretch_arm-sysroot/
/build/linux/debian_stretch_arm64-sysroot/
/build/linux/debian_*-sysroot/
/buildtools/linux64/
/buildtools/mac/
/buildtools/win/
Expand Down
24 changes: 3 additions & 21 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
[submodule "third_party/modp_b64"]
path = third_party/modp_b64
url = https://chromium.googlesource.com/chromium/src/third_party/modp_b64
[submodule "third_party/icu"]
path = third_party/icu
url = https://chromium.googlesource.com/chromium/deps/icu
[submodule "third_party/zlib"]
path = third_party/zlib
url = https://chromium.googlesource.com/chromium/src/third_party/zlib
[submodule "tools/gyp"]
path = tools/gyp
url = https://chromium.googlesource.com/external/gyp
[submodule "third_party/tcmalloc/chromium"]
path = third_party/tcmalloc/chromium
url = https://chromium.googlesource.com/chromium/src/third_party/tcmalloc/chromium
[submodule "base"]
path = base
url = https://github.com/yue/base
[submodule "third_party/ced/src"]
path = third_party/ced/src
url = https://github.com/google/compact_enc_det.git
[submodule "testing"]
path = testing
url = https://chromium.googlesource.com/chromium/src/testing
Expand All @@ -30,10 +12,10 @@
url = https://github.com/yue/gn
[submodule "buildtools/third_party/libc++/trunk"]
path = buildtools/third_party/libc++/trunk
url = https://chromium.googlesource.com/chromium/llvm-project/libcxx.git
url = https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxx.git
[submodule "buildtools/third_party/libc++abi/trunk"]
path = buildtools/third_party/libc++abi/trunk
url = https://chromium.googlesource.com/chromium/llvm-project/libcxxabi.git
url = https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git
[submodule "buildtools/third_party/libunwind/trunk"]
path = buildtools/third_party/libunwind/trunk
url = https://chromium.googlesource.com/external/llvm.org/libunwind.git
url = https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git
1 change: 0 additions & 1 deletion base
Submodule base deleted from bc8eb8
33 changes: 33 additions & 0 deletions build/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/buildflag_header.gni")
import("//build/config/chrome_build.gni")
import("//build/config/chromecast_build.gni")

source_set("buildflag_header_h") {
sources = [ "buildflag.h" ]
}

buildflag_header("branding_buildflags") {
header = "branding_buildflags.h"

if (is_chrome_branded) {
flags = [
"CHROMIUM_BRANDING=0",
"GOOGLE_CHROME_BRANDING=1",
]
} else {
flags = [
"CHROMIUM_BRANDING=1",
"GOOGLE_CHROME_BRANDING=0",
]
}
}

buildflag_header("chromecast_buildflags") {
header = "chromecast_buildflags.h"

flags = [ "IS_CHROMECAST=$is_chromecast" ]
}
66 changes: 55 additions & 11 deletions build/build_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Operating System:
// OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX) /
// OS_NACL (NACL_SFI or NACL_NONSFI) / OS_NACL_SFI / OS_NACL_NONSFI
// OS_CHROMEOS is set by the build system
// Compiler:
// COMPILER_MSVC / COMPILER_GCC
// Processor:
Expand Down Expand Up @@ -48,29 +49,40 @@
#endif
#elif defined(_WIN32)
#define OS_WIN 1
#elif defined(__Fuchsia__)
#define OS_FUCHSIA 1
#elif defined(__FreeBSD__)
#define OS_FREEBSD 1
#elif defined(__NetBSD__)
#define OS_NETBSD 1
#elif defined(__OpenBSD__)
#define OS_OPENBSD 1
#elif defined(__sun)
#define OS_SOLARIS 1
#elif defined(__QNXNTO__)
#define OS_QNX 1
#elif defined(_AIX)
#define OS_AIX 1
#elif defined(__asmjs__) || defined(__wasm__)
#define OS_ASMJS
#else
#error Please add support for your platform in build/build_config.h
#endif
// NOTE: Adding a new port? Please follow
// https://chromium.googlesource.com/chromium/src/+/master/docs/new_port_policy.md

// For access to standard BSD features, use OS_BSD instead of a
// more specific macro.
#if defined(OS_FREEBSD) || defined(OS_OPENBSD)
#if defined(OS_FREEBSD) || defined(OS_NETBSD) || defined(OS_OPENBSD)
#define OS_BSD 1
#endif

// For access to standard POSIXish features, use OS_POSIX instead of a
// more specific macro.
#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_FREEBSD) || \
defined(OS_OPENBSD) || defined(OS_SOLARIS) || defined(OS_ANDROID) || \
defined(OS_NACL) || defined(OS_QNX)
#if defined(OS_AIX) || defined(OS_ANDROID) || defined(OS_ASMJS) || \
defined(OS_FREEBSD) || defined(OS_LINUX) || defined(OS_MACOSX) || \
defined(OS_NACL) || defined(OS_NETBSD) || defined(OS_OPENBSD) || \
defined(OS_QNX) || defined(OS_SOLARIS)
#define OS_POSIX 1
#endif

Expand All @@ -97,22 +109,42 @@
#define ARCH_CPU_X86 1
#define ARCH_CPU_32_BITS 1
#define ARCH_CPU_LITTLE_ENDIAN 1
#elif defined(__s390x__)
#define ARCH_CPU_S390_FAMILY 1
#define ARCH_CPU_S390X 1
#define ARCH_CPU_64_BITS 1
#define ARCH_CPU_BIG_ENDIAN 1
#elif defined(__s390__)
#define ARCH_CPU_S390_FAMILY 1
#define ARCH_CPU_S390 1
#define ARCH_CPU_31_BITS 1
#define ARCH_CPU_BIG_ENDIAN 1
#elif (defined(__PPC64__) || defined(__PPC__)) && defined(__BIG_ENDIAN__)
#define ARCH_CPU_PPC64_FAMILY 1
#define ARCH_CPU_PPC64 1
#define ARCH_CPU_64_BITS 1
#define ARCH_CPU_BIG_ENDIAN 1
#elif defined(__PPC64__)
#define ARCH_CPU_PPC64_FAMILY 1
#define ARCH_CPU_PPC64 1
#define ARCH_CPU_64_BITS 1
#define ARCH_CPU_LITTLE_ENDIAN 1
#elif defined(__ARMEL__)
#define ARCH_CPU_ARM_FAMILY 1
#define ARCH_CPU_ARMEL 1
#define ARCH_CPU_32_BITS 1
#define ARCH_CPU_LITTLE_ENDIAN 1
#elif defined(__aarch64__)
#elif defined(__aarch64__) || defined(_M_ARM64)
#define ARCH_CPU_ARM_FAMILY 1
#define ARCH_CPU_ARM64 1
#define ARCH_CPU_64_BITS 1
#define ARCH_CPU_LITTLE_ENDIAN 1
#elif defined(__pnacl__)
#elif defined(__pnacl__) || defined(__asmjs__) || defined(__wasm__)
#define ARCH_CPU_32_BITS 1
#define ARCH_CPU_LITTLE_ENDIAN 1
#elif defined(__MIPSEL__)
#if defined(__LP64__)
#define ARCH_CPU_MIPS64_FAMILY 1
#define ARCH_CPU_MIPS_FAMILY 1
#define ARCH_CPU_MIPS64EL 1
#define ARCH_CPU_64_BITS 1
#define ARCH_CPU_LITTLE_ENDIAN 1
Expand All @@ -122,19 +154,31 @@
#define ARCH_CPU_32_BITS 1
#define ARCH_CPU_LITTLE_ENDIAN 1
#endif
#elif defined(__MIPSEB__)
#if defined(__LP64__)
#define ARCH_CPU_MIPS_FAMILY 1
#define ARCH_CPU_MIPS64 1
#define ARCH_CPU_64_BITS 1
#define ARCH_CPU_BIG_ENDIAN 1
#else
#define ARCH_CPU_MIPS_FAMILY 1
#define ARCH_CPU_MIPS 1
#define ARCH_CPU_32_BITS 1
#define ARCH_CPU_BIG_ENDIAN 1
#endif
#else
#error Please add support for your architecture in build/build_config.h
#endif

// Type detection for wchar_t.
#if defined(OS_WIN)
#define WCHAR_T_IS_UTF16
#elif defined(OS_POSIX) && defined(COMPILER_GCC) && \
defined(__WCHAR_MAX__) && \
#elif defined(OS_FUCHSIA)
#define WCHAR_T_IS_UTF32
#elif defined(OS_POSIX) && defined(COMPILER_GCC) && defined(__WCHAR_MAX__) && \
(__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff)
#define WCHAR_T_IS_UTF32
#elif defined(OS_POSIX) && defined(COMPILER_GCC) && \
defined(__WCHAR_MAX__) && \
#elif defined(OS_POSIX) && defined(COMPILER_GCC) && defined(__WCHAR_MAX__) && \
(__WCHAR_MAX__ == 0x7fff || __WCHAR_MAX__ == 0xffff)
// On Posix, we'll detect short wchar_t, but projects aren't guaranteed to
// compile in this mode (in particular, Chrome doesn't). This is intended for
Expand Down
15 changes: 7 additions & 8 deletions build/buildflag_header.gni
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# found in the LICENSE file.

# Generates a header with preprocessor defines specified by the build file.
# The GYP version of this (with instructions) is build/buildflag_header.gypi.
#
# The flags are converted to function-style defines with mangled names and
# code uses an accessor macro to access the values. This is to try to
Expand Down Expand Up @@ -32,8 +31,8 @@
#
# const char kSpamServerUrl[] = BUILDFLAG(SPAM_SERVER_URL);
#
# There will no #define called ENABLE_FOO so if you accidentally test for that
# in an ifdef it will always be negative.
# There will be no #define called ENABLE_FOO so if you accidentally test for
# that in an ifdef it will always be negative.
#
#
# Template parameters
Expand Down Expand Up @@ -80,8 +79,8 @@
#
# Example
#
# buildflag_header("foo_features") {
# header = "foo_features.h"
# buildflag_header("foo_buildflags") {
# header = "foo_buildflags.h"
#
# flags = [
# # This uses the GN build flag enable_doom_melon as the definition.
Expand All @@ -105,9 +104,7 @@ template("buildflag_header") {
header_file = rebase_path(".", "//") + "/${invoker.header}"
}

outputs = [
"$root_gen_dir/$header_file",
]
outputs = [ "$root_gen_dir/$header_file" ]

# Always write --flags to the file so it's not empty. Empty will confuse GN
# into thinking the response file isn't used.
Expand All @@ -134,5 +131,7 @@ template("buildflag_header") {
"testonly",
"visibility",
])

public_deps = [ "//build:buildflag_header_h" ]
}
}
Loading

0 comments on commit 1445180

Please sign in to comment.