Skip to content

Commit 574e625

Browse files
authored
Fixes for VS preview (#45902)
* Fixes for VS preview Stop using c++latest and designated initializers for Windows crossdac Disable warning about overriding /TP with /TC
1 parent d7aca56 commit 574e625

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

src/coreclr/pal/src/exception/remote-unwind.cpp

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1975,18 +1975,24 @@ put_unwind_info(unw_addr_space_t as, unw_proc_info_t *pip, void *arg)
19751975
{
19761976
}
19771977

1978-
static unw_accessors_t unwind_accessors =
1978+
static unw_accessors_t init_unwind_accessors()
19791979
{
1980-
.find_proc_info = find_proc_info,
1981-
.put_unwind_info = put_unwind_info,
1982-
.get_dyn_info_list_addr = get_dyn_info_list_addr,
1983-
.access_mem = access_mem,
1984-
.access_reg = access_reg,
1985-
.access_fpreg = access_fpreg,
1986-
.resume = resume,
1987-
.get_proc_name = get_proc_name
1980+
unw_accessors_t a = {0};
1981+
1982+
a.find_proc_info = find_proc_info;
1983+
a.put_unwind_info = put_unwind_info;
1984+
a.get_dyn_info_list_addr = get_dyn_info_list_addr;
1985+
a.access_mem = access_mem;
1986+
a.access_reg = access_reg;
1987+
a.access_fpreg = access_fpreg;
1988+
a.resume = resume;
1989+
a.get_proc_name = get_proc_name;
1990+
1991+
return a;
19881992
};
19891993

1994+
static unw_accessors_t unwind_accessors = init_unwind_accessors();
1995+
19901996
/*++
19911997
Function:
19921998
PAL_VirtualUnwindOutOfProc

src/coreclr/pal/src/libunwind/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ if(CLR_CMAKE_HOST_WIN32)
124124
endif ()
125125

126126
# Assume we are using default MSVC compiler
127-
add_compile_options(/std:c++latest)
128127
add_compile_options(/TC) # compile all files as C
129128
add_compile_options(/permissive-)
130129

@@ -148,6 +147,8 @@ if(CLR_CMAKE_HOST_WIN32)
148147
add_compile_options(-wd4311) # pointer truncation from 'unw_word_t *' to 'long'
149148
add_compile_options(-wd4475) # 'fprintf' : length modifier 'L' cannot be used
150149
add_compile_options(-wd4477) # fprintf argument type
150+
151+
add_compile_options(-wd9025) # overriding '/TP' with '/TC'
151152
endif (CLR_CMAKE_HOST_WIN32)
152153

153154
if(CLR_CMAKE_TARGET_ARCH_ARM)

0 commit comments

Comments
 (0)