summaryrefslogtreecommitdiffstats
path: root/chromium/build/config/c++
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-11-20 10:33:36 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-11-22 11:45:12 +0000
commitbe59a35641616a4cf23c4a13fa0632624b021c1b (patch)
tree9da183258bdf9cc413f7562079d25ace6955467f /chromium/build/config/c++
parentd702e4b6a64574e97fc7df8fe3238cde70242080 (diff)
BASELINE: Update Chromium to 62.0.3202.101
Change-Id: I2d5eca8117600df6d331f6166ab24d943d9814ac Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/build/config/c++')
-rw-r--r--chromium/build/config/c++/BUILD.gn56
-rw-r--r--chromium/build/config/c++/c++.gni23
2 files changed, 21 insertions, 58 deletions
diff --git a/chromium/build/config/c++/BUILD.gn b/chromium/build/config/c++/BUILD.gn
deleted file mode 100644
index 0f594984b21..00000000000
--- a/chromium/build/config/c++/BUILD.gn
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 2017 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/config/c++/c++.gni")
-
-config("c++flags") {
- if (use_custom_libcxx) {
- prefix = "//buildtools/third_party"
- include = "trunk/include"
- if (!is_clang) {
- # Gcc has a built-in abs() definition with default visibility.
- # If it was not disabled, it would conflict with libc++'s abs()
- # with hidden visibility.
- cflags = [ "-fno-builtin-abs" ]
- }
- cflags_cc = [
- "-nostdinc++",
- "-isystem" + rebase_path("$prefix/libc++/$include", root_build_dir),
- "-isystem" + rebase_path("$prefix/libc++abi/$include", root_build_dir),
- ]
- if (is_linux && current_cpu == "arm") {
- cflags_c = [ "-isystem" +
- rebase_path("$prefix/libunwind/$include", root_build_dir) ]
- cflags_cc += [ "-isystem" +
- rebase_path("$prefix/libunwind/$include", root_build_dir) ]
- }
-
- # Make sure we don't link against libc++ or libstdc++.
- ldflags = [ "-nodefaultlibs" ]
-
- # Unfortunately, there's no way to disable linking against just
- # libc++ (besides using clang instead of clang++); -nodefaultlibs
- # removes all of the default libraries, so add back the ones that we
- # need.
- libs = [
- "c",
- "m",
- ]
-
- if (!is_mac) {
- libs += [
- "gcc_s",
- "rt",
- ]
- }
-
- if (is_mac && using_sanitizer) {
- lib_dirs = [ "//third_party/llvm-build/Release+Asserts/lib/clang/$clang_version/lib/darwin" ]
-
- if (is_asan) {
- libs += [ "clang_rt.asan_osx_dynamic" ]
- }
- }
- }
-}
diff --git a/chromium/build/config/c++/c++.gni b/chromium/build/config/c++/c++.gni
index 13004aeb0ee..2019540253c 100644
--- a/chromium/build/config/c++/c++.gni
+++ b/chromium/build/config/c++/c++.gni
@@ -8,8 +8,20 @@ declare_args() {
# Use libc++ (buildtools/third_party/libc++ and
# buildtools/third_party/libc++abi) instead of stdlibc++ as standard
# library.
- use_custom_libcxx = (is_linux && !is_chromeos &&
- (!is_chromecast || is_cast_desktop_build)) || is_msan
+ # Don't check in changes that set this to false for more platforms; doing so
+ # is not supported.
+ use_custom_libcxx =
+ is_msan || is_fuchsia ||
+ (is_linux && is_clang &&
+ (!is_chromeos || default_toolchain != "//build/toolchain/cros:target"))
+
+ # Use libc++ instead of stdlibc++ when using the host_cpu toolchain, even if
+ # use_custom_libcxx is false. This is useful for cross-compiles where a custom
+ # toolchain for the target_cpu has been set as the default toolchain, but
+ # use_custom_libcxx should still be true when building for the host. The
+ # expected usage is to set use_custom_libcxx=false and
+ # use_custom_libcxx_for_host=true in the passed in buildargs.
+ use_custom_libcxx_for_host = false
# ASan, MSan and TSan builds need to override operator new, operator delete,
# and some exception handling symbols, so libc++ must be a shared library to
@@ -21,3 +33,10 @@ declare_args() {
libcpp_is_static = !is_component_build && !is_asan && !is_msan && !is_tsan &&
!is_ubsan && !is_ubsan_security && !is_ubsan_vptr
}
+
+use_custom_libcxx =
+ use_custom_libcxx || (use_custom_libcxx_for_host && current_cpu == host_cpu)
+
+libcxx_prefix = "//buildtools/third_party/libc++/trunk"
+libcxxabi_prefix = "//buildtools/third_party/libc++abi/trunk"
+libunwind_prefix = "//buildtools/third_party/libunwind/trunk"