From bcc84129b3829d99c3f5c4aa7d63ddfd919ea05b Mon Sep 17 00:00:00 2001 From: Vladimir Sadov Date: Sun, 11 Oct 2020 21:01:11 -0700 Subject: [PATCH] Build globalization lib (#42166) * Build static lib for System.Globalization.Native * link libSystem.Globalization.Native into the static host --- .../corehost/cli/apphost/static/CMakeLists.txt | 1 + .../Unix/System.Globalization.Native/CMakeLists.txt | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/installer/corehost/cli/apphost/static/CMakeLists.txt b/src/installer/corehost/cli/apphost/static/CMakeLists.txt index 64c4585f45ab3..8048725fe8d82 100644 --- a/src/installer/corehost/cli/apphost/static/CMakeLists.txt +++ b/src/installer/corehost/cli/apphost/static/CMakeLists.txt @@ -84,6 +84,7 @@ if(CLR_CMAKE_TARGET_WIN32) elseif(CLR_CMAKE_TARGET_LINUX) set(CORECLR_LIBRARIES ${CORECLR_STATIC_LIB_LOCATION}/libcoreclr_static.a + ${CORECLR_STATIC_LIB_LOCATION}/libSystem.Globalization.Native.a ${CORECLR_STATIC_LIB_LOCATION}/libcoreclrpal.a ${CORECLR_STATIC_LIB_LOCATION}/libpalrt.a ${CORECLR_STATIC_LIB_LOCATION}/libeventprovider.a diff --git a/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt b/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt index 8995556ef91c2..081ee602a8538 100644 --- a/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt +++ b/src/libraries/Native/Unix/System.Globalization.Native/CMakeLists.txt @@ -83,15 +83,15 @@ if (GEN_SHARED_LIB) install_with_stripped_symbols (System.Globalization.Native PROGRAMS .) endif() -add_library(System.Globalization.Native_obj - OBJECT + +add_library(System.Globalization.Native-static + STATIC ${NATIVEGLOBALIZATION_SOURCES} ) -set_target_properties(System.Globalization.Native_obj PROPERTIES OUTPUT_NAME System.Globalization.Native CLEAN_DIRECT_OUTPUT 1) +set_target_properties(System.Globalization.Native-static PROPERTIES OUTPUT_NAME System.Globalization.Native CLEAN_DIRECT_OUTPUT 1) -add_library(System.Globalization.Native-static INTERFACE) -target_sources(System.Globalization.Native-static INTERFACE $) +install (TARGETS System.Globalization.Native-static DESTINATION lib) if(NOT CLR_CMAKE_TARGET_OSX AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND NOT CLR_CMAKE_TARGET_ANDROID) if (GEN_SHARED_LIB)