summaryrefslogtreecommitdiff
path: root/chromium/build
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-03-14 14:01:25 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-12-03 17:27:53 +0100
commitba2a7f51b353c943bec7441134b377b6cc3783a2 (patch)
treed0d95df64a8b0d6d9c03ab250d05d4d056c9b8ac /chromium/build
parent6a7fb06c960720cc20bdeddc0c320f46cdd4a953 (diff)
downloadqtwebengine-chromium-ba2a7f51b353c943bec7441134b377b6cc3783a2.tar.gz
Support linux-clang-libc++ builds
Introduce use_libcxx gn arg to explicitly ask for -stdlib=libc++ Change-Id: I5b8449d937c8af848b9f89c6a9879742b83f46d6 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/build')
-rw-r--r--chromium/build/config/compiler/BUILD.gn13
1 files changed, 9 insertions, 4 deletions
diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn
index b2942177ab9..088d14102ec 100644
--- a/chromium/build/config/compiler/BUILD.gn
+++ b/chromium/build/config/compiler/BUILD.gn
@@ -74,6 +74,9 @@ declare_args() {
# the needed gcov profiling data.
auto_profile_path = ""
+ # Use stdlib=libc++
+ use_libcxx = is_mac
+
# Allow projects that wish to stay on C++11 to override Chromium's default.
use_cxx11 = false
@@ -585,9 +588,11 @@ config("compiler") {
cflags_cc += [ "-Wno-trigraphs" ]
}
- if (is_mac) {
- # The system libc++ on Mac doesn't have aligned allocation in C++17.
- defines += [ "_LIBCPP_HAS_NO_ALIGNED_ALLOCATION" ]
+ if (use_libcxx) {
+ if (is_mac) {
+ # The system libc++ on Mac doesn't have aligned allocation in C++17.
+ defines += [ "_LIBCPP_HAS_NO_ALIGNED_ALLOCATION" ]
+ }
cflags_cc += [ "-stdlib=libc++" ]
ldflags += [ "-stdlib=libc++" ]
}
@@ -1150,7 +1155,7 @@ config("compiler_deterministic") {
# Tells the compiler not to use absolute paths when passing the default
# paths to the tools it invokes. We don't want this because we don't
# really need it and it can mess up the goma cache entries.
- if (is_clang && !is_nacl) {
+ if (is_clang && !is_nacl && !(use_qt && use_libcxx)) {
cflags += [ "-no-canonical-prefixes" ]
}
}