File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed
llvm/utils/gn/secondary/libcxx Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -4,4 +4,7 @@ declare_args() {
4
4
5
5
# libc++ inline ABI namespace. Defaults to __n, where n is the ABI version.
6
6
libcxx_abi_namespace = " "
7
+
8
+ # Build timezone database as part of libc++experimental.
9
+ libcxx_enable_time_zone_database = target_os == " linux"
7
10
}
Original file line number Diff line number Diff line change @@ -51,6 +51,11 @@ if (current_toolchain == default_toolchain) {
51
51
} else {
52
52
values += [ " _LIBCPP_ABI_NAMESPACE=__" + libcxx_abi_version ]
53
53
}
54
+ if (! libcxx_enable_time_zone_database ) {
55
+ values += [ " _LIBCPP_HAS_NO_TIME_ZONE_DATABASE=1" ]
56
+ } else {
57
+ values += [ " _LIBCPP_HAS_NO_TIME_ZONE_DATABASE=" ]
58
+ }
54
59
}
55
60
56
61
write_cmake_config (" write_modulemap" ) {
@@ -351,6 +356,8 @@ if (current_toolchain == default_toolchain) {
351
356
" __chrono/steady_clock.h" ,
352
357
" __chrono/system_clock.h" ,
353
358
" __chrono/time_point.h" ,
359
+ " __chrono/tzdb.h" ,
360
+ " __chrono/tzdb_list.h" ,
354
361
" __chrono/weekday.h" ,
355
362
" __chrono/year.h" ,
356
363
" __chrono/year_month.h" ,
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ declare_args() {
12
12
# Build libc++ as a static library.
13
13
libcxx_enable_static = true
14
14
15
- # Build filesystem as part of libc++fs.a .
15
+ # Build filesystem as part of libc++.
16
16
libcxx_enable_filesystem = target_os != " win"
17
17
18
18
# Build libc++experimental.a.
@@ -307,6 +307,12 @@ if (libcxx_enable_experimental) {
307
307
output_dir = runtimes_dir
308
308
output_name = " c++experimental"
309
309
sources = [ " experimental/memory_resource.cpp" ]
310
+ if (libcxx_enable_filesystem && libcxx_enable_time_zone_database ) {
311
+ sources += [
312
+ " tz.cpp" ,
313
+ " tzdb_list.cpp" ,
314
+ ]
315
+ }
310
316
deps = [ " //libcxx/include" ]
311
317
configs += [ " :cxx_config" ]
312
318
configs -= [
You can’t perform that action at this time.
0 commit comments