Skip to content

Commit

Permalink
Fixes for VS preview (#45902)
Browse files Browse the repository at this point in the history
* Fixes for VS preview

Stop using c++latest and designated initializers for Windows crossdac
Disable warning about overriding /TP with /TC
  • Loading branch information
sdmaclea authored Dec 11, 2020
1 parent d7aca56 commit 574e625
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
24 changes: 15 additions & 9 deletions src/coreclr/pal/src/exception/remote-unwind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1975,18 +1975,24 @@ put_unwind_info(unw_addr_space_t as, unw_proc_info_t *pip, void *arg)
{
}

static unw_accessors_t unwind_accessors =
static unw_accessors_t init_unwind_accessors()
{
.find_proc_info = find_proc_info,
.put_unwind_info = put_unwind_info,
.get_dyn_info_list_addr = get_dyn_info_list_addr,
.access_mem = access_mem,
.access_reg = access_reg,
.access_fpreg = access_fpreg,
.resume = resume,
.get_proc_name = get_proc_name
unw_accessors_t a = {0};

a.find_proc_info = find_proc_info;
a.put_unwind_info = put_unwind_info;
a.get_dyn_info_list_addr = get_dyn_info_list_addr;
a.access_mem = access_mem;
a.access_reg = access_reg;
a.access_fpreg = access_fpreg;
a.resume = resume;
a.get_proc_name = get_proc_name;

return a;
};

static unw_accessors_t unwind_accessors = init_unwind_accessors();

/*++
Function:
PAL_VirtualUnwindOutOfProc
Expand Down
3 changes: 2 additions & 1 deletion src/coreclr/pal/src/libunwind/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ if(CLR_CMAKE_HOST_WIN32)
endif ()

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

Expand All @@ -148,6 +147,8 @@ if(CLR_CMAKE_HOST_WIN32)
add_compile_options(-wd4311) # pointer truncation from 'unw_word_t *' to 'long'
add_compile_options(-wd4475) # 'fprintf' : length modifier 'L' cannot be used
add_compile_options(-wd4477) # fprintf argument type

add_compile_options(-wd9025) # overriding '/TP' with '/TC'
endif (CLR_CMAKE_HOST_WIN32)

if(CLR_CMAKE_TARGET_ARCH_ARM)
Expand Down

0 comments on commit 574e625

Please sign in to comment.