diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake index cd78352efa528d..d9443ce6ddfc46 100644 --- a/eng/native/configurecompiler.cmake +++ b/eng/native/configurecompiler.cmake @@ -480,11 +480,8 @@ if (CLR_CMAKE_HOST_UNIX) # We mark the function which needs exporting with DLLEXPORT add_compile_options(-fvisibility=hidden) - # Separate functions so linker can remove them. But not on tvOS because - # -ffunction-sections is not supported with -fembed-bitcode. - if (NOT CLR_CMAKE_HOST_TVOS) - add_compile_options(-ffunction-sections) - endif() + # Separate functions so linker can remove them. + add_compile_options(-ffunction-sections) # Specify the minimum supported version of macOS # Mac Catalyst needs a special CFLAG, exclusive with mmacosx-version-min diff --git a/src/mono/CMakeLists.txt b/src/mono/CMakeLists.txt index cdff32677c0f5c..37a64158d4b9f8 100644 --- a/src/mono/CMakeLists.txt +++ b/src/mono/CMakeLists.txt @@ -193,13 +193,6 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS" OR CMAKE_SYSTEM_NAME STREQUAL "tvOS") set(HOST_IOS 1) if(CMAKE_SYSTEM_NAME STREQUAL "tvOS") set(HOST_TVOS 1) - # with -fembed-bitcode passing -headerpad_max_install_names is not allowed so remove it from the CMake flags - string(REPLACE "-Wl,-headerpad_max_install_names" "" CMAKE_C_LINK_FLAGS ${CMAKE_C_LINK_FLAGS}) - string(REPLACE "-Wl,-headerpad_max_install_names" "" CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS}) - string(REPLACE "-Wl,-headerpad_max_install_names" "" CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}) - string(REPLACE "-Wl,-headerpad_max_install_names" "" CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}) - add_compile_options(-fembed-bitcode) - add_link_options(-fembed-bitcode) endif() set(PTHREAD_POINTER_ID 1) set(USE_MACH_SEMA 1) diff --git a/src/native/libs/CMakeLists.txt b/src/native/libs/CMakeLists.txt index 26ff71928ffb67..251473bef8d4d4 100644 --- a/src/native/libs/CMakeLists.txt +++ b/src/native/libs/CMakeLists.txt @@ -53,14 +53,6 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER) set(STATIC_LIB_DESTINATION .) endif () - if (CLR_CMAKE_TARGET_TVOS) - # with -fembed-bitcode passing -headerpad_max_install_names is not allowed so remove it from the CMake flags - string(REPLACE "-Wl,-headerpad_max_install_names" "" CMAKE_C_LINK_FLAGS ${CMAKE_C_LINK_FLAGS}) - string(REPLACE "-Wl,-headerpad_max_install_names" "" CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}) - add_compile_options(-fembed-bitcode) - add_link_options(-fembed-bitcode) - endif () - if (CLR_CMAKE_TARGET_ANDROID) if (CROSS_ROOTFS) include_directories(SYSTEM "${CROSS_ROOTFS}/usr/include")