File tree 5 files changed +26
-6
lines changed
native/corehost/apphost/static 5 files changed +26
-6
lines changed Original file line number Diff line number Diff line change @@ -449,6 +449,15 @@ if (CLR_CMAKE_HOST_UNIX)
449
449
add_compile_options (-Wno-incompatible-ms-struct)
450
450
451
451
add_compile_options (-Wno-reserved-identifier)
452
+
453
+ # clang 16.0 introduced buffer hardening https://discourse.llvm.org/t/rfc-c-buffer-hardening/65734
454
+ # which we are not conforming to yet.
455
+ add_compile_options (-Wno-unsafe-buffer-usage)
456
+
457
+ # other clang 16.0 suppressions
458
+ add_compile_options (-Wno-single-bit-bitfield-constant-conversion)
459
+ add_compile_options (-Wno-cast-function-type -strict)
460
+ add_compile_options (-Wno-incompatible-function-pointer-types-strict)
452
461
else ()
453
462
add_compile_options (-Wno-uninitialized)
454
463
add_compile_options (-Wno-strict-aliasing)
Original file line number Diff line number Diff line change @@ -100,6 +100,17 @@ elseif(CLR_CMAKE_HOST_UNIX)
100
100
mscordaccore
101
101
)
102
102
103
+ # Before llvm 16, lld was setting `--undefined-version` by default. The default was
104
+ # flipped to `--no-undefined-version` in lld 16, so we will explicitly set it to
105
+ # `--undefined-version` for our use-case.
106
+ include (CheckLinkerFlag OPTIONAL )
107
+ if (COMMAND check_linker_flag)
108
+ check_linker_flag(CXX -Wl,--undefined-version LINKER_SUPPORTS_UNDEFINED_VERSION)
109
+ if (LINKER_SUPPORTS_UNDEFINED_VERSION)
110
+ add_linker_flag(-Wl,--undefined-version )
111
+ endif (LINKER_SUPPORTS_UNDEFINED_VERSION)
112
+ endif (COMMAND check_linker_flag)
113
+
103
114
# COREDBI_LIBRARIES is mentioned twice because ld is one pass linker and will not find symbols
104
115
# if they are defined after they are used. Having all libs twice makes sure that ld will actually
105
116
# find all symbols.
Original file line number Diff line number Diff line change @@ -65,8 +65,8 @@ if(CLR_CMAKE_TARGET_WIN32)
65
65
add_linker_flag("/DEF:${CMAKE_CURRENT_SOURCE_DIR} /singlefilehost.def" )
66
66
67
67
else ()
68
- if (CLR_CMAKE_TARGET_OSX )
69
- set (DEF_SOURCES ${CMAKE_CURRENT_SOURCE_DIR} /singlefilehost_OSXexports .src)
68
+ if (CLR_CMAKE_TARGET_FREEBSD )
69
+ set (DEF_SOURCES ${CMAKE_CURRENT_SOURCE_DIR} /singlefilehost_freebsdexports .src)
70
70
else ()
71
71
set (DEF_SOURCES ${CMAKE_CURRENT_SOURCE_DIR} /singlefilehost_unixexports.src)
72
72
endif ()
Original file line number Diff line number Diff line change @@ -9,3 +9,7 @@ g_dacTable
9
9
10
10
; Used by profilers
11
11
MetaDataGetDispenser
12
+
13
+ ; FreeBSD needs to reexport these
14
+ __progname
15
+ environ
Original file line number Diff line number Diff line change @@ -9,7 +9,3 @@ g_dacTable
9
9
10
10
; Used by profilers
11
11
MetaDataGetDispenser
12
-
13
- ; FreeBSD needs to reexport these
14
- __progname
15
- environ
You can’t perform that action at this time.
0 commit comments