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 3737#include " ImageInspection.h"
3838#include " swift/Demangling/Demangle.h"
3939#include " swift/Runtime/Atomic.h"
40+ #if defined(_WIN32)
41+ #include " swift/Runtime/Config.h"
42+ #endif
4043#include " swift/Runtime/Debug.h"
4144#include " swift/Runtime/Portability.h"
4245#include " swift/Runtime/Win32.h"
@@ -544,6 +547,7 @@ void swift::swift_abortDisabledUnicodeSupport() {
544547}
545548
546549#if defined(_WIN32)
550+ SWIFT_ALLOWED_RUNTIME_GLOBAL_CTOR_BEGIN
547551// On Windows, exceptions may be swallowed in some cases and the
548552// process may not terminate as expected on crashes. For example,
549553// illegal instructions used by llvm.trap. Disable the exception
@@ -555,5 +559,5 @@ static void ConfigureExceptionPolicy() {
555559 UOI_TIMERPROC_EXCEPTION_SUPPRESSION,
556560 &Suppress, sizeof (Suppress));
557561}
558-
562+ SWIFT_ALLOWED_RUNTIME_GLOBAL_CTOR_END
559563#endif
Original file line number Diff line number Diff line change 2525#include < stdio.h>
2626#include < stdlib.h>
2727
28+ #if defined(_WIN32)
29+ #include " swift/Runtime/Config.h"
30+ #endif
2831#include " swift/shims/LibcShims.h"
2932
3033#if defined(_WIN32)
34+ SWIFT_ALLOWED_RUNTIME_GLOBAL_CTOR_BEGIN
3135static void __attribute__ ((__constructor__))
3236_swift_stdlib_configure_console_mode(void ) {
3337 static UINT uiPrevConsoleCP = GetConsoleOutputCP ();
3438 atexit ([]() { SetConsoleOutputCP (uiPrevConsoleCP); });
3539 SetConsoleOutputCP (CP_UTF8);
3640}
41+ SWIFT_ALLOWED_RUNTIME_GLOBAL_CTOR_END
3742#endif
3843
3944SWIFT_RUNTIME_STDLIB_INTERNAL
You can’t perform that action at this time.
0 commit comments