File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 37
37
#include " ImageInspection.h"
38
38
#include " swift/Demangling/Demangle.h"
39
39
#include " swift/Runtime/Atomic.h"
40
+ #if defined(_WIN32)
41
+ #include " swift/Runtime/Config.h"
42
+ #endif
40
43
#include " swift/Runtime/Debug.h"
41
44
#include " swift/Runtime/Portability.h"
42
45
#include " swift/Runtime/Win32.h"
@@ -544,6 +547,7 @@ void swift::swift_abortDisabledUnicodeSupport() {
544
547
}
545
548
546
549
#if defined(_WIN32)
550
+ SWIFT_ALLOWED_RUNTIME_GLOBAL_CTOR_BEGIN
547
551
// On Windows, exceptions may be swallowed in some cases and the
548
552
// process may not terminate as expected on crashes. For example,
549
553
// illegal instructions used by llvm.trap. Disable the exception
@@ -555,5 +559,5 @@ static void ConfigureExceptionPolicy() {
555
559
UOI_TIMERPROC_EXCEPTION_SUPPRESSION,
556
560
&Suppress, sizeof (Suppress));
557
561
}
558
-
562
+ SWIFT_ALLOWED_RUNTIME_GLOBAL_CTOR_END
559
563
#endif
Original file line number Diff line number Diff line change 25
25
#include < stdio.h>
26
26
#include < stdlib.h>
27
27
28
+ #if defined(_WIN32)
29
+ #include " swift/Runtime/Config.h"
30
+ #endif
28
31
#include " swift/shims/LibcShims.h"
29
32
30
33
#if defined(_WIN32)
34
+ SWIFT_ALLOWED_RUNTIME_GLOBAL_CTOR_BEGIN
31
35
static void __attribute__ ((__constructor__))
32
36
_swift_stdlib_configure_console_mode(void ) {
33
37
static UINT uiPrevConsoleCP = GetConsoleOutputCP ();
34
38
atexit ([]() { SetConsoleOutputCP (uiPrevConsoleCP); });
35
39
SetConsoleOutputCP (CP_UTF8);
36
40
}
41
+ SWIFT_ALLOWED_RUNTIME_GLOBAL_CTOR_END
37
42
#endif
38
43
39
44
SWIFT_RUNTIME_STDLIB_INTERNAL
You can’t perform that action at this time.
0 commit comments