Skip to content

Commit ecdcd8b

Browse files
authored
Update libcxx and other dependencies (#38)
1 parent 64ba146 commit ecdcd8b

File tree

11 files changed

+98
-26
lines changed

11 files changed

+98
-26
lines changed

DEPS

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
deps = {
66
'src/third_party/rapidjson': 'https://fuchsia.googlesource.com/third_party/rapidjson@ef3564c5c8824989393b87df25355baf35ff544b',
7-
'src/third_party/libcxx': 'https://llvm.googlesource.com/llvm-project/libcxx@54c3dc7343f40254bdb069699202e6d65eda66a2',
8-
'src/third_party/libcxxabi': 'https://llvm.googlesource.com/llvm-project/libcxxabi@65a68da0f1b102574db316d326a53735b03a4574',
7+
'src/third_party/libcxx': 'https://llvm.googlesource.com/llvm-project/libcxx@44079a4cc04cdeffb9cfe8067bfb3c276fb2bab0',
8+
'src/third_party/libcxxabi': 'https://llvm.googlesource.com/llvm-project/libcxxabi@2ce528fb5e0f92e57c97ec3ff53b75359d33af12',
99
'src/third_party/googletest': 'https://github.com/google/googletest@054a986a8513149e8374fc669a5fe40117ca6b41',
10-
'src/third_party/dart': 'https://dart.googlesource.com/sdk.git@63c2197b976931c6472d9dc9574f98ff2ae9408c',
10+
'src/third_party/dart': 'https://dart.googlesource.com/sdk.git@1618a775995ef6f862b9f05be61a6a8fc23f2e4d',
1111
'src/third_party/clang': {
1212
'packages': [
1313
{
1414
'package': 'fuchsia/third_party/clang/linux-amd64',
15-
'version': 'ugk-KfeqO9fhSfhBFRG4Z-56Kr2AQVSEbku9AEUdotYC'
15+
'version': 'git_revision:20d06c833d833ef6b2d0f519cc4a7998d49a2803'
1616
}
1717
],
1818
'dep_type': 'cipd',
@@ -30,7 +30,7 @@ deps = {
3030
'packages': [
3131
{
3232
'package': 'infra/3pp/tools/ninja/${{platform}}',
33-
'version': 'version:2@1.8.2.chromium.3',
33+
'version': 'version:2@1.11.1.chromium.4',
3434
}
3535
],
3636
'dep_type': 'cipd',

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ The Flutter embedder for Tizen.
3434

3535
`cd` into the generated `src` directory and run the following commands.
3636

37-
Note: The toolchain path (`/usr/lib/llvm-12`) can be replaced as you want. For example, you can use `~/tizen-studio/tools/llvm-10` if you have [Tizen Studio](https://developer.tizen.org/development/tizen-studio/download) and the `NativeToolchain-Gcc-9.2` package installed.
38-
3937
- **For arm**
4038

4139
```sh

build/config/BUILD.gn

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ config("cxx_version_11") {
112112
cflags_cc = [ "-std=c++11" ]
113113
}
114114

115+
config("cxx_version_20") {
116+
cflags_cc = [ "-std=c++20" ]
117+
}
118+
115119
config("no_system_cxx") {
116120
cflags_cc = [ "-nostdinc++" ]
117121
ldflags = [ "-nostdlib++" ]

build/config/BUILDCONFIG.gn

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ _default_configs = [
4141
if (use_system_cxx) {
4242
_default_configs += [ "//build/config:system_cxx" ]
4343
} else {
44-
_default_configs += [ "//build/config:no_system_cxx" ]
44+
_default_configs += [
45+
"//build/config:no_system_cxx",
46+
"//third_party/libcxxabi:libcxxabi_config",
47+
"//third_party/libcxx:libcxx_config",
48+
]
4549
}
4650

4751
if (is_unopt) {

build/secondary/third_party/libcxx/BUILD.gn

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5+
config("libcxx_config") {
6+
defines = [ "_LIBCPP_DISABLE_AVAILABILITY=1" ]
7+
include_dirs = [ "//build/secondary/third_party/libcxx/config" ]
8+
}
9+
10+
config("src_include") {
11+
include_dirs = [ "src" ]
12+
}
13+
514
source_set("libcxx") {
615
sources = [
716
"src/algorithm.cpp",
@@ -21,6 +30,7 @@ source_set("libcxx") {
2130
"src/future.cpp",
2231
"src/hash.cpp",
2332
"src/ios.cpp",
33+
"src/ios.instantiations.cpp",
2434
"src/iostream.cpp",
2535
"src/locale.cpp",
2636
"src/memory.cpp",
@@ -30,6 +40,9 @@ source_set("libcxx") {
3040
"src/optional.cpp",
3141
"src/random.cpp",
3242
"src/regex.cpp",
43+
"src/ryu/d2fixed.cpp",
44+
"src/ryu/d2s.cpp",
45+
"src/ryu/f2s.cpp",
3346
"src/shared_mutex.cpp",
3447
"src/stdexcept.cpp",
3548
"src/string.cpp",
@@ -45,7 +58,10 @@ source_set("libcxx") {
4558

4659
deps = [ "//third_party/libcxxabi" ]
4760

48-
public_configs = [ "//third_party/libcxxabi:libcxxabi_config" ]
61+
public_configs = [
62+
":libcxx_config",
63+
"//third_party/libcxxabi:libcxxabi_config",
64+
]
4965

5066
defines = [
5167
"_LIBCPP_NO_EXCEPTIONS",
@@ -54,6 +70,12 @@ source_set("libcxx") {
5470
"LIBCXX_BUILDING_LIBCXXABI",
5571
]
5672

73+
# libcxx requires C++20.
74+
configs -= [ "//build/config:cxx_version_default" ]
75+
configs += [ "//build/config:cxx_version_20" ]
76+
77+
configs += [ ":src_include" ]
78+
5779
# shared_mutex.cpp and debug.cpp are purposefully in violation.
5880
cflags_cc = [ "-Wno-thread-safety-analysis" ]
5981
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#ifndef _LIBCPP_CONFIG_SITE
2+
#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 */
29+
30+
#define _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
31+
32+
// This is a workaround for BoringSSL, which is compiled in C11 mode
33+
// and includes stdatomic.h. Defining this macro will cause stdatomic.h
34+
// to redirect to the next version of that header in the include path.
35+
#if !defined(__cplusplus) && defined(__clang__)
36+
#define _LIBCPP_COMPILER_CLANG_BASED
37+
#endif
38+
39+
#endif // _LIBCPP_CONFIG_SITE

build/secondary/third_party/libcxxabi/BUILD.gn

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,26 @@ source_set("libcxxabi") {
1616
public_configs = [ ":libcxxabi_config" ]
1717

1818
defines = [
19-
"_LIBCXXABI_NO_EXCEPTIONS",
19+
"_LIBCPP_BUILDING_LIBRARY",
2020
"_LIBCXXABI_BUILDING_LIBRARY",
2121
"LIBCXXABI_SILENT_TERMINATE",
2222
"_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
2323
]
2424

25-
sources = [ "src/cxa_noexception.cpp" ]
26-
27-
# Compile libcxx ABI using C++11. This replicates the rule in the
28-
# CMakeLists on the "cxx_abiobjects" target.
2925
configs -= [ "//build/config:cxx_version_default" ]
30-
configs += [ "//build/config:cxx_version_11" ]
26+
configs += [ "//build/config:cxx_version_20" ]
27+
28+
configs += [ "//third_party/libcxx:src_include" ]
3129

32-
sources += [
30+
sources = [
3331
"src/abort_message.cpp",
3432
"src/cxa_aux_runtime.cpp",
3533
"src/cxa_default_handlers.cpp",
3634
"src/cxa_demangle.cpp",
3735
"src/cxa_exception_storage.cpp",
3836
"src/cxa_guard.cpp",
3937
"src/cxa_handlers.cpp",
40-
"src/cxa_unexpected.cpp",
38+
"src/cxa_noexception.cpp",
4139
"src/cxa_vector.cpp",
4240
"src/cxa_virtual.cpp",
4341
"src/fallback_malloc.cpp",

flutter/shell/platform/tizen/channels/key_event_channel.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ constexpr char kLinuxKeyMap[] = "linux";
3636
constexpr size_t kMaxPendingEvents = 1000;
3737

3838
uint32_t Utf8ToUtf32CodePoint(const char* utf8) {
39+
#pragma clang diagnostic push
40+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
3941
std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t> converter;
42+
#pragma clang diagnostic pop
4043
for (wchar_t wchar : converter.from_bytes(utf8)) {
4144
return wchar;
4245
}

flutter/shell/platform/tizen/flutter_tizen_engine.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,9 @@ void FlutterTizenEngine::SetupLocales() {
371371
// Convert the locale list to the locale pointer list that must be provided.
372372
std::vector<const FlutterLocale*> flutter_locale_list;
373373
flutter_locale_list.reserve(flutter_locales.size());
374-
std::transform(
375-
flutter_locales.begin(), flutter_locales.end(),
376-
std::back_inserter(flutter_locale_list),
377-
[](const auto& arg) -> const auto* { return &arg; });
374+
std::transform(flutter_locales.begin(), flutter_locales.end(),
375+
std::back_inserter(flutter_locale_list),
376+
[](const auto& arg) -> const auto* { return &arg; });
378377

379378
embedder_api_.UpdateLocales(engine_, flutter_locale_list.data(),
380379
flutter_locale_list.size());

flutter/shell/platform/tizen/tizen_window_ecore_wl2.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ void TizenWindowEcoreWl2::EnableCursor() {
160160
}
161161

162162
// These functions are defined in vd-win-util's cursor_module.h.
163-
int (*CursorModule_Initialize)(wl_display * display, wl_registry * registry,
164-
wl_seat * seat, unsigned int id);
165-
int (*Cursor_Set_Config)(wl_surface * surface, uint32_t config_type,
163+
int (*CursorModule_Initialize)(wl_display* display, wl_registry* registry,
164+
wl_seat* seat, unsigned int id);
165+
int (*Cursor_Set_Config)(wl_surface* surface, uint32_t config_type,
166166
void* data);
167167
void (*CursorModule_Finalize)(void);
168168
*(void**)(&CursorModule_Initialize) =

0 commit comments

Comments
 (0)