|
1 | 1 | Auto generated patch. Do not edit or delete it, even if empty.
|
2 |
| -diff -ruN --strip-trailing-cr a/libcxx/src/iostream.cpp b/libcxx/src/iostream.cpp |
3 |
| ---- a/libcxx/src/iostream.cpp |
4 |
| -+++ b/libcxx/src/iostream.cpp |
5 |
| -@@ -18,8 +18,8 @@ |
| 2 | +diff -ruN --strip-trailing-cr a/utils/bazel/llvm-project-overlay/llvm/config.bzl b/utils/bazel/llvm-project-overlay/llvm/config.bzl |
| 3 | +--- a/utils/bazel/llvm-project-overlay/llvm/config.bzl |
| 4 | ++++ b/utils/bazel/llvm-project-overlay/llvm/config.bzl |
| 5 | +@@ -47,6 +47,7 @@ |
6 | 6 |
|
7 |
| - template <class StreamT, class BufferT> |
8 |
| - union stream_data { |
9 |
| -- stream_data() {} |
10 |
| -- ~stream_data() {} |
11 |
| -+ constexpr stream_data() {} |
12 |
| -+ constexpr ~stream_data() {} |
13 |
| - struct { |
14 |
| - // The stream has to be the first element, since that's referenced by the stream declarations in <iostream> |
15 |
| - StreamT stream; |
16 |
| -@@ -38,13 +38,19 @@ |
17 |
| - #define CHAR_MANGLING_wchar_t "_W" |
18 |
| - #define CHAR_MANGLING(CharT) CHAR_MANGLING_##CharT |
| 7 | + linux_defines = posix_defines + [ |
| 8 | + "_GNU_SOURCE", |
| 9 | ++ "HAVE_GETAUXVAL=1", |
| 10 | + "HAVE_MALLINFO=1", |
| 11 | + "HAVE_SBRK=1", |
| 12 | + "HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC=1", |
| 13 | +diff -ruN --strip-trailing-cr a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h b/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h |
| 14 | +--- a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h |
| 15 | ++++ b/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h |
| 16 | +@@ -296,7 +296,7 @@ |
19 | 17 |
|
20 |
| -+#ifdef _LIBCPP_COMPILER_CLANG_BASED |
21 |
| -+# define STRING_DATA_CONSTINIT constinit |
22 |
| -+#else |
23 |
| -+# define STRING_DATA_CONSTINIT |
24 |
| -+#endif |
25 |
| -+ |
26 |
| - #ifdef _LIBCPP_ABI_MICROSOFT |
27 |
| - # define STREAM(StreamT, BufferT, CharT, var) \ |
28 |
| -- stream_data<StreamT<CharT>, BufferT<CharT>> var __asm__( \ |
29 |
| -+ STRING_DATA_CONSTINIT stream_data<StreamT<CharT>, BufferT<CharT>> var __asm__( \ |
30 |
| - "?" #var "@" ABI_NAMESPACE_STR "@std@@3V?$" #StreamT \ |
31 |
| - "@" CHAR_MANGLING(CharT) "U?$char_traits@" CHAR_MANGLING(CharT) "@" ABI_NAMESPACE_STR "@std@@@12@A") |
32 |
| - #else |
33 |
| --# define STREAM(StreamT, BufferT, CharT, var) stream_data<StreamT<CharT>, BufferT<CharT>> var |
34 |
| -+# define STREAM(StreamT, BufferT, CharT, var) STRING_DATA_CONSTINIT stream_data<StreamT<CharT>, BufferT<CharT>> var |
35 |
| - #endif |
| 18 | + /* HAVE_PROC_PID_RUSAGE defined in Bazel */ |
36 | 19 |
|
37 |
| - // These definitions and the declarations in <iostream> technically cause ODR violations, since they have different |
38 |
| -diff -ruN --strip-trailing-cr a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init/ios_Init.global.pass.cpp b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init/ios_Init.global.pass.cpp |
39 |
| ---- a/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init/ios_Init.global.pass.cpp |
40 |
| -+++ b/libcxx/test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init/ios_Init.global.pass.cpp |
41 |
| -@@ -0,0 +1,20 @@ |
42 |
| -+//===----------------------------------------------------------------------===// |
43 |
| -+// |
44 |
| -+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
45 |
| -+// See https://llvm.org/LICENSE.txt for license information. |
46 |
| -+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
47 |
| -+// |
48 |
| -+//===----------------------------------------------------------------------===// |
49 |
| -+ |
50 |
| -+#include <iostream> |
51 |
| -+ |
52 |
| -+// FIXME: Remove after issue https://github.com/llvm/llvm-project/issues/127348 resolved. |
53 |
| -+extern "C" const char* __asan_default_options() { return "check_initialization_order=true:strict_init_order=true"; } |
54 |
| -+ |
55 |
| -+// Test that ios used from globals constructors doesn't trigger Asan initialization-order-fiasco. |
56 |
| -+ |
57 |
| -+struct Global { |
58 |
| -+ Global() { std::cout << "Hello!"; } |
59 |
| -+} global; |
60 |
| -+ |
61 |
| -+int main(int, char**) { return 0; } |
| 20 | +-#define HAVE_GETAUXVAL 1 |
| 21 | ++/* HAVE_GETAUXVAL defined in Bazel */ |
| 22 | + |
| 23 | + /* Directly provide definitions here behind platform preprocessor definitions. |
| 24 | + * The preprocessor conditions are sufficient to handle all of the configuration |
0 commit comments