Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1c0b32b
from prototype
VSadov Nov 12, 2020
4adfaa6
fix OSX
VSadov Nov 12, 2020
0facc65
fix for Android
VSadov Nov 16, 2020
a2ab07c
treat "libSystem.Globalization.Native" as QCall in mono too (for now).
VSadov Nov 17, 2020
2b2f800
fix for wasm
VSadov Nov 19, 2020
8c4e514
current
VSadov Nov 20, 2020
6e584b4
remove no longer needed hacks
VSadov Nov 20, 2020
ba71464
Undo confusing changes for now
VSadov Nov 20, 2020
4563d69
fix pedantic errors on GCC
VSadov Nov 20, 2020
51281d6
delete gPalGlobalizationNative
VSadov Nov 21, 2020
25369f4
pass overrider from the host
VSadov Nov 21, 2020
e6fca93
default override
VSadov Nov 21, 2020
c11612f
default PInvoke override runs after optional host-provided overrider.
VSadov Nov 23, 2020
d3f4abe
Some PR feedback (mostly related to code, not the CMake stuff).
VSadov Nov 25, 2020
79453c7
more coding PR feedback
VSadov Dec 1, 2020
becda0e
Deleted "libraries-native" folder.
VSadov Dec 1, 2020
932b5fe
unifying tryrun.cmake into 1 common file
VSadov Dec 2, 2020
3f5cea9
factor out adding lib-specific dependencies into one place (per nativ…
VSadov Dec 3, 2020
8d2b6b9
cleanup: entirely remove tryrun.cmake propagation in eng, gen-buildsy…
VSadov Dec 3, 2020
9b7476f
remove "clrcompression.dll" and "libSystem.IO.Compression.Native.dyli…
VSadov Dec 3, 2020
8a02254
mono: refactor Globalization lookup into `default_resolve_dllimport`.
VSadov Dec 3, 2020
f22e9fd
set FEATURE_DISTRO_AGNOSTIC_SSL according to __PortableBuild
VSadov Dec 3, 2020
e539a1a
CORECLR_CALLING_CONVENTION for the host callback types
VSadov Dec 3, 2020
06dad00
revert change in pal_gssapi.h
VSadov Dec 3, 2020
ac026ba
keep the #include "pal_config.h"
VSadov Dec 4, 2020
eb62c4a
refactor common parts of entrypoints.c into entrypoints.h
VSadov Dec 4, 2020
2f45a47
rename OverrideEntry --> DllImportEntry
VSadov Dec 4, 2020
7b2bdef
extra libs as CMake functions
VSadov Dec 4, 2020
7ab3211
use macros instead of functions in extra_libs.cmake
VSadov Dec 4, 2020
7bf0a63
mono formatting style in src/mono/mono/metadata/native-library.c
VSadov Dec 4, 2020
d3a15fa
mono: Remaining stylistic nits.
VSadov Dec 4, 2020
6c55b68
do not set DFEATURE_DISTRO_AGNOSTIC_SSL on iOS, Android, tvOS
VSadov Dec 7, 2020
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
Next Next commit
from prototype
  • Loading branch information
VSadov committed Dec 5, 2020
commit 1c0b32b00f7044568591525e01c6d7abebdc7f64
16 changes: 16 additions & 0 deletions eng/native/build-commons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,22 @@ if [[ "$__PortableBuild" == 0 ]]; then
__CommonMSBuildArgs="$__CommonMSBuildArgs /p:PortableBuild=false"
fi

if [[ "$__BuildArch" == wasm ]]; then
# nothing to do here
true
elif [[ "$__TargetOS" == iOS ]]; then
# nothing to do here
true
elif [[ "$__TargetOS" == tvOS ]]; then
# nothing to do here
true
elif [[ "$__TargetOS" == Android && -z "$ROOTFS_DIR" ]]; then
# nothing to do here
true
else
__CMakeArgs="-DFEATURE_DISTRO_AGNOSTIC_SSL=$__PortableBuild $__CMakeArgs"
fi

# Configure environment if we are doing a cross compile.
if [[ "$__CrossBuild" == 1 ]]; then
CROSSCOMPILE=1
Expand Down
2 changes: 1 addition & 1 deletion eng/native/configurecompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ endif(CLR_CMAKE_HOST_UNIX)
if (MSVC)
# Compile options for targeting windows

add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/TP>) # compile all files as C++
# add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/TP>) # compile all files as C++
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/nologo>) # Suppress Startup Banner
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/W3>) # set warning level to 3
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/WX>) # treat warnings as errors
Expand Down
19 changes: 19 additions & 0 deletions src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,23 @@ if (CLR_CMAKE_HOST_UNIX)
set(LIB_UNWINDER unwinder_wks)
endif (CLR_CMAKE_HOST_UNIX)

if(CLR_CMAKE_HOST_WIN32)
set(COMPRESSION_LIB clrcompression-static)
else()
set(COMPRESSION_LIB System.IO.Compression.Native-Static)

if (CLR_CMAKE_TARGET_BROWSER)
add_definitions(-s USE_ZLIB)
elseif (CLR_CMAKE_TARGET_ANDROID)
# need special case here since we want to link against libz.so but find_package() would resolve libz.a
set(ZLIB_LIBRARIES z)
elseif (CLR_CMAKE_TARGET_SUNOS)
set(ZLIB_LIBRARIES z m)
else ()
find_package(ZLIB REQUIRED)
endif ()
endif()

# IMPORTANT! Please do not rearrange the order of the libraries. The linker on Linux is
# order dependent and changing the order can result in undefined symbols in the shared
# library.
Expand All @@ -108,6 +125,8 @@ set(CORECLR_LIBRARIES
utilcode
v3binder
System.Globalization.Native-Static
${COMPRESSION_LIB}
${ZLIB_LIBRARIES}
interop
)

Expand Down
19 changes: 15 additions & 4 deletions src/coreclr/src/libraries-native/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(GLOBALIZATION_NATIVE_DIR ${CLR_REPO_ROOT_DIR}/src/libraries/Native/Unix/System.Globalization.Native)

# Suppress exporting of the PAL APIs
add_definitions(-DPALEXPORT=EXTERN_C)

include_directories("${GLOBALIZATION_NATIVE_DIR}")
include_directories("${CLR_REPO_ROOT_DIR}/src/libraries/Native/Unix/Common")
set(STATIC_LIBS_ONLY 1)

add_subdirectory(${GLOBALIZATION_NATIVE_DIR} System.Globalization.Native)
if(CLR_CMAKE_TARGET_WIN32)
set(GLOBALIZATION_NATIVE_DIR ${CLR_REPO_ROOT_DIR}/src/libraries/Native/Unix/System.Globalization.Native)
set(COMPRESSION_NATIVE_DIR ${CLR_REPO_ROOT_DIR}/src/libraries/Native/Windows/clrcompression)

include_directories("${GLOBALIZATION_NATIVE_DIR}")
include_directories("${COMPRESSION_NATIVE_DIR}")

include_directories("${CLR_REPO_ROOT_DIR}/src/libraries/Native/Unix/Common")

add_subdirectory(${COMPRESSION_NATIVE_DIR} clrcompression)
add_subdirectory(${GLOBALIZATION_NATIVE_DIR} System.Globalization.Native)

else()
add_subdirectory(${CLR_REPO_ROOT_DIR}/src/libraries/Native/Unix Native.Unix)
endif()
2 changes: 2 additions & 0 deletions src/coreclr/src/vm/corelib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ const USHORT c_nCoreLibFieldDescriptions = NumItems(c_rgCoreLibFieldDescriptions

// ECalls defined by libraries-native shims
EXTERN_C const LPVOID gPalGlobalizationNative[];
EXTERN_C const LPVOID gEmbedded_Brotli[];
EXTERN_C const LPVOID gEmbedded_zlib[];

// When compiling crossgen, we only need the target version of the ecall tables
#if !defined(CROSSGEN_COMPILE) || defined(CROSSGEN_CORELIB)
Expand Down
7 changes: 5 additions & 2 deletions src/coreclr/src/vm/dllimport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4230,7 +4230,11 @@ void NDirect::PopulateNDirectMethodDesc(NDirectMethodDesc* pNMD, PInvokeStaticSi
if (callConv == pmCallConvThiscall)
ndirectflags |= NDirectMethodDesc::kThisCall;

if (pNMD->GetLoaderModule()->IsSystem() && strcmp(szLibName, "QCall") == 0)
if ((pNMD->GetLoaderModule()->IsSystem() && (strcmp(szLibName, "QCall") == 0)) ||
(szLibName != NULL &&
(strcmp(szLibName, "libSystem.Globalization.Native") == 0 ||
strcmp(szLibName, "libSystem.IO.Compression.Native") == 0 ||
strcmp(szLibName, "clrcompression") == 0)))
{
ndirectflags |= NDirectMethodDesc::kIsQCall;
}
Expand Down Expand Up @@ -6224,7 +6228,6 @@ namespace
// this matches exactly the names in Interop.Libraries.cs
static const LPCWSTR toRedirect[] = {
W("libSystem.Native"),
W("libSystem.IO.Compression.Native"),
W("libSystem.Net.Security.Native"),
W("libSystem.Security.Cryptography.Native.OpenSsl")
};
Expand Down
10 changes: 6 additions & 4 deletions src/coreclr/src/vm/ecall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ LPVOID ECall::GetQCallImpl(MethodDesc * pMD)
if (id == 0)
{
id = ECall::GetIDForMethod(pMD);
_ASSERTE(id != 0);
_ASSERTE_MSG(id != 0, pMD->m_pszDebugMethodName);

// Cache the id
((NDirectMethodDesc *)pMD)->SetECallID(id);
Expand All @@ -683,9 +683,11 @@ LPVOID ECall::GetQCallImpl(MethodDesc * pMD)
// SuppressUnmanagedCodeSecurityAttribute on QCalls suppresses a full demand, but there's still a link demand
// for unmanaged code permission. All QCalls should be private or internal and wrapped in a managed method
// to suppress this link demand.
CONSISTENCY_CHECK_MSGF(!fPublicOrProtected,
("%s::%s has to be private or internal.",
pMD->m_pszDebugClassName, pMD->m_pszDebugMethodName));

// TODO: HACK HACK HACK uncomment this
//CONSISTENCY_CHECK_MSGF(!fPublicOrProtected,
// ("%s::%s has to be private or internal.",
// pMD->m_pszDebugClassName, pMD->m_pszDebugMethodName));
#endif

return cur->m_pImplementation;
Expand Down
7 changes: 7 additions & 0 deletions src/coreclr/src/vm/ecalllist.h
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,9 @@ FCClassElement("AssemblyExtensions", "System.Reflection.Metadata", gAssemblyExte
FCClassElement("AssemblyLoadContext", "System.Runtime.Loader", gAssemblyLoadContextFuncs)

FCClassElement("AssemblyName", "System.Reflection", gAssemblyNameFuncs)
#ifndef CROSSGEN_COMPILE
FCClassElement("Brotli", "", gEmbedded_Brotli)
#endif
FCClassElement("Buffer", "System", gBufferFuncs)
FCClassElement("CLRConfig", "System", gClrConfig)
FCClassElement("CastHelpers", "System.Runtime.CompilerServices", gCastHelpers)
Expand Down Expand Up @@ -1224,6 +1227,10 @@ FCClassElement("X86Base", "System.Runtime.Intrinsics.X86", gX86BaseFuncs)
FCClassElement("XplatEventLogger", "System.Diagnostics.Tracing", gEventLogger)
#endif //defined(FEATURE_EVENTSOURCE_XPLAT)

#ifndef CROSSGEN_COMPILE
FCClassElement("zlib", "", gEmbedded_zlib)
#endif

#undef FCFuncElement
#undef FCFuncElementSig
#undef FCIntrinsic
Expand Down
6 changes: 6 additions & 0 deletions src/coreclr/tryrun.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ elseif(TARGET_ARCH_NAME MATCHES "^(armel|arm|arm64|x86)$" OR FREEBSD OR ILLUMOS)
set_cache_value(HAS_POSIX_SEMAPHORES_EXITCODE 0)
set_cache_value(HAVE_CLOCK_MONOTONIC_COARSE_EXITCODE 0)
set_cache_value(HAVE_CLOCK_MONOTONIC_EXITCODE 0)
set_cache_value(HAVE_CLOCK_REALTIME_EXITCODE 0)
set_cache_value(HAVE_CLOCK_THREAD_CPUTIME_EXITCODE 0)
set_cache_value(HAVE_COMPATIBLE_ACOS_EXITCODE 0)
set_cache_value(HAVE_COMPATIBLE_ASIN_EXITCODE 0)
Expand Down Expand Up @@ -100,16 +101,21 @@ elseif(TARGET_ARCH_NAME MATCHES "^(armel|arm|arm64|x86)$" OR FREEBSD OR ILLUMOS)


if(ALPINE_LINUX)
set_cache_value(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP_EXITCODE 1)
set_cache_value(SSCANF_CANNOT_HANDLE_MISSING_EXPONENT_EXITCODE 0)
set_cache_value(SSCANF_SUPPORT_ll_EXITCODE 1)
set_cache_value(UNGETC_NOT_RETURN_EOF_EXITCODE 1)
else()
set_cache_value(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP_EXITCODE 0)
set_cache_value(SSCANF_CANNOT_HANDLE_MISSING_EXPONENT_EXITCODE 1)
set_cache_value(SSCANF_SUPPORT_ll_EXITCODE 0)
set_cache_value(UNGETC_NOT_RETURN_EOF_EXITCODE 0)
endif()

if (FREEBSD)
set_cache_value(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP 1)
set_cache_value(HAVE_CLOCK_MONOTONIC 1)
set_cache_value(HAVE_CLOCK_REALTIME 1)
set_cache_value(HAVE_BROKEN_FIFO_KEVENT_EXITCODE 1)
set_cache_value(HAVE_PROCFS_MAPS 0)
set_cache_value(HAVE_PROCFS_STAT 0)
Expand Down
4 changes: 2 additions & 2 deletions src/installer/corehost/cli/apphost/static/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ if(CLR_CMAKE_TARGET_WIN32)
set(CORECLR_LIBRARIES
${CORECLR_STATIC_LIB_LOCATION}/coreclr_static.lib
${CORECLR_STATIC_LIB_LOCATION}/System.Globalization.Native.lib
${CORECLR_STATIC_LIB_LOCATION}/libclrcompression.lib
kernel32.lib
advapi32.lib
ole32.lib
Expand All @@ -131,6 +132,7 @@ else()
set(CORECLR_LIBRARIES
${CORECLR_STATIC_LIB_LOCATION}/libcoreclr_static.a
${CORECLR_STATIC_LIB_LOCATION}/libSystem.Globalization.Native.a
${CORECLR_STATIC_LIB_LOCATION}/libSystem.IO.Compression.Native.a
${CORECLR_STATIC_LIB_LOCATION}/libpalrt.a
${CORECLR_STATIC_LIB_LOCATION}/libcoreclrpal.a
${CORECLR_STATIC_LIB_LOCATION}/libeventprovider.a
Expand Down Expand Up @@ -186,7 +188,6 @@ if(NOT CLR_CMAKE_TARGET_LINUX)
)
else()
set(NATIVE_LIBS
${NATIVE_LIBS_LOCATION}/libSystem.IO.Compression.Native.a
${NATIVE_LIBS_LOCATION}/libSystem.Native.a
${NATIVE_LIBS_LOCATION}/libSystem.Net.Security.Native.a
${NATIVE_LIBS_LOCATION}/libSystem.Security.Cryptography.Native.OpenSsl.a
Expand Down Expand Up @@ -265,7 +266,6 @@ target_link_libraries(singlefilehost
${ZLIB_LIBRARIES}
${LIBGSS}
${NATIVE_LIBS_EXTRA}

)

if(NOT FEATURE_DISTRO_AGNOSTIC_SSL)
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/Common/src/Interop/Interop.Libraries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ internal static partial class Interop
{
internal static partial class Libraries
{
internal const string GlobalizationNative = "QCall";
internal const string GlobalizationNative = "libSystem.Globalization.Native";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ internal static partial class Libraries
internal const string Wldap32 = "wldap32.dll";
internal const string Ws2_32 = "ws2_32.dll";
internal const string Wtsapi32 = "wtsapi32.dll";
internal const string CompressionNative = "clrcompression.dll";
internal const string CompressionNative = "clrcompression";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to rename this to System.IO.Compression.Native (fine to do it in separate PR).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you mean renaming the actual dll ?
Yes, might be better to do that separately - just in case it breaks something that expects the old file name (packaging, installers, things in SDK repo..)

We can also easily embed it now, similar to System.Globalization, unless there are reasons we want it as a separate dll.

internal const string MsQuic = "msquic.dll";
internal const string HostPolicy = "hostpolicy.dll";
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#include <stdint.h>

// Include System.IO.Compression.Native headers
#include "../zlib/pal_zlib.h"
#include "../brotli/include/brotli/decode.h"
#include "../brotli/include/brotli/encode.h"
#include "../brotli/include/brotli/port.h"
#include "../brotli/include/brotli/types.h"

#define FCFuncStart(name) EXTERN_C const void* name[]; const void* name[] = {
#define FCFuncEnd() (void*)0x01 /* FCFuncFlag_EndOfArray */ };

#define QCFuncElement(name,impl) \
(void*)0x8 /* FCFuncFlag_QCall */, (void*)(impl), (void*)name,

FCFuncStart(gEmbedded_Brotli)
QCFuncElement("BrotliDecoderCreateInstance", BrotliDecoderCreateInstance)
QCFuncElement("BrotliDecoderDecompress", BrotliDecoderDecompress)
QCFuncElement("BrotliDecoderDecompressStream", BrotliDecoderDecompressStream)
QCFuncElement("BrotliDecoderDestroyInstance", BrotliDecoderDestroyInstance)
QCFuncElement("BrotliDecoderIsFinished", BrotliDecoderIsFinished)
QCFuncElement("BrotliEncoderCompress", BrotliEncoderCompress)
QCFuncElement("BrotliEncoderCompressStream", BrotliEncoderCompressStream)
QCFuncElement("BrotliEncoderCreateInstance", BrotliEncoderCreateInstance)
QCFuncElement("BrotliEncoderDestroyInstance", BrotliEncoderDestroyInstance)
QCFuncElement("BrotliEncoderHasMoreOutput", BrotliEncoderHasMoreOutput)
QCFuncElement("BrotliEncoderSetParameter", BrotliEncoderSetParameter)
FCFuncEnd()

FCFuncStart(gEmbedded_zlib)
QCFuncElement("crc32", CompressionNative_Crc32)
QCFuncElement("Deflate", CompressionNative_Deflate)
QCFuncElement("DeflateEnd", CompressionNative_DeflateEnd)
QCFuncElement("DeflateInit2_", CompressionNative_DeflateInit2_)
QCFuncElement("Inflate", CompressionNative_Inflate)
QCFuncElement("InflateEnd", CompressionNative_InflateEnd)
QCFuncElement("InflateInit2_", CompressionNative_InflateInit2_)
FCFuncEnd()

15 changes: 12 additions & 3 deletions src/libraries/Native/Unix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,24 @@ if (PRERELEASE)
add_compile_options(-Werror)
endif()

if(STATIC_LIBS_ONLY)
set(STATIC_LIB_DESTINATION lib)
set(GEN_SHARED_LIB 0)
else()
set(STATIC_LIB_DESTINATION .)
set(GEN_SHARED_LIB 1)
endif()

if(CLR_CMAKE_TARGET_BROWSER)
# The emscripten build has additional warnings so -Werror breaks
add_compile_options(-Wno-unused-parameter)
add_compile_options(-Wno-unused-function)
add_compile_options(-Wno-alloca)
add_compile_options(-Wno-implicit-int-float-conversion)
else()
set(GEN_SHARED_LIB 1)
endif(CLR_CMAKE_TARGET_BROWSER)

set(GEN_SHARED_LIB 0)
set(STATIC_LIB_DESTINATION .)
endif()

if (CLR_CMAKE_TARGET_ARCH_AMD64)
add_definitions(-DTARGET_64BIT=1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ typedef uint16_t UChar;
#define QCFuncElement(name,impl) \
(void*)0x8 /* FCFuncFlag_QCall */, (void*)(impl), (void*)name,


FCFuncStart(gPalGlobalizationNative)
QCFuncElement("ChangeCase", GlobalizationNative_ChangeCase)
QCFuncElement("ChangeCaseInvariant", GlobalizationNative_ChangeCaseInvariant)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ if (NOT CLR_CMAKE_TARGET_BROWSER)
../../AnyOS/brotli/enc/metablock.c
../../AnyOS/brotli/enc/static_dict.c
../../AnyOS/brotli/enc/utf8_util.c
../../AnyOS/System.IO.Compression.Native/entrypoints.c
)

# Disable implicit fallthrough warning for Brotli
Expand All @@ -78,4 +79,4 @@ add_library(System.IO.Compression.Native-Static

set_target_properties(System.IO.Compression.Native-Static PROPERTIES OUTPUT_NAME System.IO.Compression.Native CLEAN_DIRECT_OUTPUT 1)

install (TARGETS System.IO.Compression.Native-Static DESTINATION .)
install (TARGETS System.IO.Compression.Native-Static DESTINATION ${STATIC_LIB_DESTINATION})
21 changes: 13 additions & 8 deletions src/libraries/Native/Unix/System.IO.Ports.Native/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
project(System.IO.Ports.Native C)

add_library(System.IO.Ports.Native
SHARED
pal_termios.c
pal_serial.c
${VERSION_FILE_PATH}
)
if (GEN_SHARED_LIB)
add_library(System.IO.Ports.Native
SHARED
pal_termios.c
pal_serial.c
${VERSION_FILE_PATH}
)
endif()

add_library(System.IO.Ports.Native-Static
STATIC
Expand All @@ -15,5 +17,8 @@ add_library(System.IO.Ports.Native-Static

set_target_properties(System.IO.Ports.Native-Static PROPERTIES OUTPUT_NAME System.IO.Ports.Native CLEAN_DIRECT_OUTPUT 1)

install_with_stripped_symbols (System.IO.Ports.Native PROGRAMS .)
install (TARGETS System.IO.Ports.Native-Static DESTINATION .)
if (GEN_SHARED_LIB)
install_with_stripped_symbols (System.IO.Ports.Native PROGRAMS .)
endif()

install (TARGETS System.IO.Ports.Native-Static DESTINATION ${STATIC_LIB_DESTINATION})
3 changes: 2 additions & 1 deletion src/libraries/Native/Unix/System.Native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ endif ()
add_library(System.Native-Static
STATIC
${NATIVE_SOURCES}
entrypoints.c
)

if (CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
Expand All @@ -84,4 +85,4 @@ endif ()

set_target_properties(System.Native-Static PROPERTIES OUTPUT_NAME System.Native CLEAN_DIRECT_OUTPUT 1)

install (TARGETS System.Native-Static DESTINATION .)
install (TARGETS System.Native-Static DESTINATION ${STATIC_LIB_DESTINATION})
Loading