Skip to content

Commit 8773b66

Browse files
iinozemtsevCommit Queue
authored andcommitted
Reland "Update libcxx and libcxxabi"
This is a reland of commit 3491f72 Original change's description: > Update libcxx and libcxxabi > > Add libc, required by libcxx. > > Based on flutter/flutter#165621. > > Change-Id: I5b929dc81b2572e3b919a8d20e031f98196375e6 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416220 > Auto-Submit: Ivan Inozemtsev <[email protected]> > Reviewed-by: Ryan Macnak <[email protected]> > Commit-Queue: Ivan Inozemtsev <[email protected]> Change-Id: I9392f4cdc2ccb985085768c90bd293d353bf4c95 Cq-Include-Trybots: luci.dart.try:vm-aot-tsan-linux-release-x64-try,vm-tsan-linux-release-arm64-try,vm-msan-linux-release-x64-try,vm-ubsan-linux-release-arm64-try,vm-asan-linux-release-x64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/421300 Reviewed-by: Alexander Aprelev <[email protected]> Commit-Queue: Ivan Inozemtsev <[email protected]>
1 parent 094538f commit 8773b66

File tree

6 files changed

+80
-32
lines changed

6 files changed

+80
-32
lines changed

DEPS

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@ vars = {
104104
"devtools_rev": "1fb2f4ce5099042b7f2dfa93dec675a21861d21f",
105105
"icu_rev": "43953f57b037778a1b8005564afabe214834f7bd",
106106
"jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1",
107-
"libcxx_rev": "44079a4cc04cdeffb9cfe8067bfb3c276fb2bab0",
108-
"libcxxabi_rev": "2ce528fb5e0f92e57c97ec3ff53b75359d33af12",
107+
"libcxx_rev": "bd557f6f764d1e40b62528a13b124ce740624f8f",
108+
"libcxxabi_rev": "a4dda1589d37a7e4b4f7a81ebad01b1083f2e726",
109+
"libc_rev": "5af39a19a1ad51ce93972cdab206dcd3ff9b6afa",
109110
"libprotobuf_rev": "24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb",
110111
"markupsafe_rev": "8f45f5cfa0009d2a70589bcda0349b8cb2b72783",
111112
"perfetto_rev": "13ce0c9e13b0940d2476cd0cff2301708a9a2e2b",
@@ -273,6 +274,9 @@ deps = {
273274
Var("dart_root") + "/third_party/libcxxabi":
274275
Var("llvm_git") + "/llvm-project/libcxxabi" + "@" + Var("libcxxabi_rev"),
275276

277+
Var("dart_root") + "/third_party/libc":
278+
Var("llvm_git") + "/llvm-project/libc" + "@" + Var("libc_rev"),
279+
276280
Var("dart_root") + "/third_party/boringssl/src":
277281
"https://boringssl.googlesource.com/boringssl.git" +
278282
"@" + Var("boringssl_rev"),
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright 2013 The Flutter Authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
4+
5+
config("config") {
6+
visibility = [ ":*" ]
7+
include_dirs = [ "." ]
8+
defines = [ "LIBC_NAMESPACE=__llvm_libc_dart" ]
9+
}
10+
11+
group("libc") {
12+
# libc is only used as a dependency of libcxx.
13+
visibility = [ "//third_party/libcxx" ]
14+
15+
public_configs = [ ":config" ]
16+
}

build/secondary/third_party/libcxx/BUILD.gn

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,24 @@ source_set("libcxx") {
1515
sources = [
1616
"src/algorithm.cpp",
1717
"src/any.cpp",
18+
"src/atomic.cpp",
19+
"src/barrier.cpp",
1820
"src/bind.cpp",
21+
"src/call_once.cpp",
1922
"src/charconv.cpp",
2023
"src/chrono.cpp",
2124
"src/condition_variable.cpp",
2225
"src/condition_variable_destructor.cpp",
23-
"src/debug.cpp",
26+
"src/error_category.cpp",
2427
"src/exception.cpp",
28+
"src/filesystem/directory_entry.cpp",
2529
"src/filesystem/directory_iterator.cpp",
26-
"src/filesystem/filesystem_common.h",
30+
"src/filesystem/filesystem_clock.cpp",
31+
"src/filesystem/filesystem_error.cpp",
2732
"src/filesystem/int128_builtins.cpp",
2833
"src/filesystem/operations.cpp",
34+
"src/filesystem/path.cpp",
35+
"src/fstream.cpp",
2936
"src/functional.cpp",
3037
"src/future.cpp",
3138
"src/hash.cpp",
@@ -34,11 +41,17 @@ source_set("libcxx") {
3441
"src/iostream.cpp",
3542
"src/locale.cpp",
3643
"src/memory.cpp",
44+
"src/memory_resource.cpp",
3745
"src/mutex.cpp",
3846
"src/mutex_destructor.cpp",
3947
"src/new.cpp",
48+
"src/new_handler.cpp",
49+
"src/new_helpers.cpp",
4050
"src/optional.cpp",
51+
"src/ostream.cpp",
52+
"src/print.cpp",
4153
"src/random.cpp",
54+
"src/random_shuffle.cpp",
4255
"src/regex.cpp",
4356
"src/ryu/d2fixed.cpp",
4457
"src/ryu/d2s.cpp",
@@ -50,13 +63,16 @@ source_set("libcxx") {
5063
"src/system_error.cpp",
5164
"src/thread.cpp",
5265
"src/typeinfo.cpp",
53-
"src/utility.cpp",
5466
"src/valarray.cpp",
5567
"src/variant.cpp",
5668
"src/vector.cpp",
69+
"src/verbose_abort.cpp",
5770
]
5871

59-
deps = [ "//third_party/libcxxabi" ]
72+
deps = [
73+
"//third_party/libc",
74+
"//third_party/libcxxabi",
75+
]
6076

6177
# TODO(goderbauer): remove when all sources build with LTO for android_arm64 and android_x64.
6278
if (is_android && (current_cpu == "arm64" || current_cpu == "x64")) {
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#ifndef DART_LIBCXX_ASSERTION_HANDLER
2+
#define DART_LIBCXX_ASSERTION_HANDLER
3+
4+
#include <__verbose_abort>
5+
6+
#define _LIBCPP_ASSERTION_HANDLER(message) _LIBCPP_VERBOSE_ABORT("%s", message)
7+
8+
#endif // DART_LIBCXX_ASSERTION_HANDLER
Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,7 @@
11
#ifndef _LIBCPP_CONFIG_SITE
22
#define _LIBCPP_CONFIG_SITE
3-
4-
/* #undef _LIBCPP_ABI_VERSION */
5-
/* #undef _LIBCPP_ABI_UNSTABLE */
6-
/* #undef _LIBCPP_ABI_FORCE_ITANIUM */
7-
/* #undef _LIBCPP_ABI_FORCE_MICROSOFT */
8-
/* #undef _LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT */
9-
/* #undef _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE */
10-
/* #undef _LIBCPP_HAS_NO_STDIN */
11-
/* #undef _LIBCPP_HAS_NO_STDOUT */
12-
/* #undef _LIBCPP_HAS_NO_THREADS */
13-
/* #undef _LIBCPP_HAS_NO_MONOTONIC_CLOCK */
14-
/* #undef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS */
15-
/* #undef _LIBCPP_HAS_MUSL_LIBC */
16-
/* #undef _LIBCPP_HAS_THREAD_API_PTHREAD */
17-
/* #undef _LIBCPP_HAS_THREAD_API_EXTERNAL */
18-
/* #undef _LIBCPP_HAS_THREAD_API_WIN32 */
19-
/* #undef _LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL */
20-
/* #undef _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS */
21-
#define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
22-
/* #undef _LIBCPP_NO_VCRUNTIME */
23-
/* #undef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION */
24-
/* #undef _LIBCPP_ABI_NAMESPACE */
25-
/* #undef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY */
26-
/* #undef _LIBCPP_HAS_PARALLEL_ALGORITHMS */
27-
/* #undef _LIBCPP_HAS_NO_RANDOM_DEVICE */
28-
/* #undef _LIBCPP_HAS_NO_LOCALIZATION */
3+
#define _LIBCPP_ABI_VERSION 1
4+
#define _LIBCPP_ABI_NAMESPACE _d
295

306
#define _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
317

@@ -36,4 +12,31 @@
3612
#define _LIBCPP_COMPILER_CLANG_BASED
3713
#endif
3814

15+
#if defined(__APPLE__)
16+
#define _LIBCPP_PSTL_BACKEND_LIBDISPATCH 1
17+
#else
18+
#define _LIBCPP_PSTL_BACKEND_STD_THREAD 1
19+
#endif
20+
21+
#define _LIBCPP_HARDENING_MODE_DEFAULT _LIBCPP_HARDENING_MODE_NONE
22+
23+
#define _LIBCPP_HAS_FILESYSTEM 1
24+
#define _LIBCPP_HAS_LOCALIZATION 1
25+
#define _LIBCPP_HAS_MONOTONIC_CLOCK 1
26+
#define _LIBCPP_HAS_RANDOM_DEVICE 1
27+
#define _LIBCPP_HAS_THREADS 1
28+
#define _LIBCPP_HAS_VENDOR_AVAILABILITY_ANNOTATIONS 0
29+
#define _LIBCPP_HAS_UNICODE 1
30+
#define _LIBCPP_HAS_WIDE_CHARACTERS 1
31+
32+
#ifdef _WIN32
33+
#define _LIBCPP_HAS_THREAD_API_PTHREAD 0
34+
#define _LIBCPP_HAS_THREAD_API_EXTERNAL 0
35+
#define _LIBCPP_HAS_THREAD_API_WIN32 1
36+
#else
37+
#define _LIBCPP_HAS_THREAD_API_PTHREAD 1
38+
#define _LIBCPP_HAS_THREAD_API_EXTERNAL 0
39+
#define _LIBCPP_HAS_THREAD_API_WIN32 0
40+
#endif
41+
3942
#endif // _LIBCPP_CONFIG_SITE

runtime/engine/engine.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
#include "engine/engine.h"
6+
#include <errno.h>
67
#include <memory>
78
#include "bin/dartutils.h"
89
#include "include/dart_api.h"

0 commit comments

Comments
 (0)