diff options
author | Hyeongseok Oh <hseok82.oh@samsung.com> | 2017-04-13 20:09:32 +0900 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2017-04-13 13:09:32 +0200 |
commit | e5faef44cac6e86b12b3b586742183293bdd34a7 (patch) | |
tree | 066f2808a9adcc6487cca8228037ceb993ffe4ec | |
parent | 63cf53abae162743f1b217ee0ef3bbd3c505d097 (diff) | |
download | coreclr-e5faef44cac6e86b12b3b586742183293bdd34a7.tar.gz coreclr-e5faef44cac6e86b12b3b586742183293bdd34a7.tar.bz2 coreclr-e5faef44cac6e86b12b3b586742183293bdd34a7.zip |
[ARM32/Linux] Build libcoreclrtraceptprovider.so (#10406)
* Build libcoreclrtraceptprovider.so for ARM32 and modify cmake
- Build libcoreclrtraceptprovider.so for ARM32
- Include libcoreclrtraceptprovider.so in nuget package
- Don't build libcoreclrtraceptprovider.so for
Tizen: lttng is not supported in Tizen
- Exclude packaging libcoreclrtraceptprovider.so based on os-name
excluded for tizen
* Remove libcoreclrtraceptprovider.so before test for ARM32/Linux
Remove libcoreclrtraceptprovider.so before test for ARM32/Linux in CI
CI test environment using docker with qemu has some problem to use lttng library
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rw-r--r-- | clrdefinitions.cmake | 10 | ||||
-rw-r--r-- | src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/runtime.Linux.Microsoft.NETCore.Runtime.CoreCLR.props | 3 | ||||
-rw-r--r-- | src/pal/CMakeLists.txt | 10 | ||||
-rwxr-xr-x | tests/scripts/arm32_ci_test.sh | 6 |
5 files changed, 27 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 257cf2dfcf..f18b67b8c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,7 +166,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux) # Detect Linux ID if(DEFINED CLR_CMAKE_LINUX_ID) - if(CLR_CMAKE_LINUX_ID STREQUAL alpine) + if(CLR_CMAKE_LINUX_ID STREQUAL ubuntu) + set(CLR_CMAKE_TARGET_UBUNTU_LINUX 1) + elseif(CLR_CMAKE_LINUX_ID STREQUAL tizen) + set(CLR_CMAKE_TARGET_TIZEN_LINUX 1) + elseif(CLR_CMAKE_LINUX_ID STREQUAL alpine) set(CLR_CMAKE_PLATFORM_ALPINE_LINUX 1) endif() if(CLR_CMAKE_LINUX_ID STREQUAL ubuntu) diff --git a/clrdefinitions.cmake b/clrdefinitions.cmake index c4bfb8ea39..cb39e1f999 100644 --- a/clrdefinitions.cmake +++ b/clrdefinitions.cmake @@ -7,8 +7,14 @@ endif() if (WIN32) set(FEATURE_EVENT_TRACE 1) endif() -if(CLR_CMAKE_PLATFORM_LINUX AND CLR_CMAKE_TARGET_ARCH_AMD64) - set(FEATURE_EVENT_TRACE 1) +if(CLR_CMAKE_PLATFORM_LINUX) + if(CLR_CMAKE_TARGET_ARCH_AMD64) + set(FEATURE_EVENT_TRACE 1) + elseif(CLR_CMAKE_TARGET_ARCH_ARM) + if(NOT(CLR_CMAKE_TARGET_TIZEN_LINUX)) + set(FEATURE_EVENT_TRACE 1) + endif() + endif() endif() if (CLR_CMAKE_TARGET_ARCH_AMD64) diff --git a/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/runtime.Linux.Microsoft.NETCore.Runtime.CoreCLR.props b/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/runtime.Linux.Microsoft.NETCore.Runtime.CoreCLR.props index db8b03173b..4ad2538826 100644 --- a/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/runtime.Linux.Microsoft.NETCore.Runtime.CoreCLR.props +++ b/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/runtime.Linux.Microsoft.NETCore.Runtime.CoreCLR.props @@ -4,8 +4,7 @@ <_PlatformDoesNotSupportNiFiles Condition="'$(Platform)' == 'arm'">true</_PlatformDoesNotSupportNiFiles> <_PlatformDoesNotSupportNiFiles Condition="'$(Platform)' == 'armel'">true</_PlatformDoesNotSupportNiFiles> <_PlatformDoesNotSupportNiFiles Condition="'$(Platform)' == 'x86'">true</_PlatformDoesNotSupportNiFiles> - <_PlatformDoesNotSupportEventTrace Condition="'$(Platform)' == 'arm'">true</_PlatformDoesNotSupportEventTrace> - <_PlatformDoesNotSupportEventTrace Condition="'$(Platform)' == 'armel'">true</_PlatformDoesNotSupportEventTrace> + <_PlatformDoesNotSupportEventTrace Condition="'$(_runtimeOSFamily)' == 'tizen'">true</_PlatformDoesNotSupportEventTrace> <_PlatformDoesNotSupportEventTrace Condition="'$(Platform)' == 'x86'">true</_PlatformDoesNotSupportEventTrace> </PropertyGroup> <ItemGroup> diff --git a/src/pal/CMakeLists.txt b/src/pal/CMakeLists.txt index 8e3228b622..453bddde6c 100644 --- a/src/pal/CMakeLists.txt +++ b/src/pal/CMakeLists.txt @@ -5,8 +5,14 @@ project(COREPAL) if (WIN32) set(FEATURE_EVENT_TRACE 1) endif() -if(CLR_CMAKE_PLATFORM_LINUX AND CLR_CMAKE_TARGET_ARCH_AMD64) - set(FEATURE_EVENT_TRACE 1) +if(CLR_CMAKE_PLATFORM_LINUX) + if(CLR_CMAKE_TARGET_ARCH_AMD64) + set(FEATURE_EVENT_TRACE 1) + elseif(CLR_CMAKE_TARGET_ARCH_ARM) + if(NOT(CLR_CMAKE_TARGET_TIZEN_LINUX)) + set(FEATURE_EVENT_TRACE 1) + endif() + endif() endif() include_directories(${COREPAL_SOURCE_DIR}/inc) diff --git a/tests/scripts/arm32_ci_test.sh b/tests/scripts/arm32_ci_test.sh index 33a951e324..995bbf85b0 100755 --- a/tests/scripts/arm32_ci_test.sh +++ b/tests/scripts/arm32_ci_test.sh @@ -97,7 +97,7 @@ if [ "$__abi" == "armel" ]; then mkdir -p ${__ROOTFS_DIR} tar -zxf mic-output/tizen.tar.gz -C ${__ROOTFS_DIR} apt-get update - apt-get -y -qq --force-yes install --reinstall qemu binfmt-support qemu-user-static + apt-get -y -qq --force-yes --reinstall install qemu binfmt-support qemu-user-static __qemuARM=$(which qemu-arm-static) cp $__qemuARM ${CORECLR_DIR}/cross/rootfs/armel/usr/bin/ cp $__qemuARM ${__ROOTFS_DIR}/usr/bin/ @@ -112,6 +112,10 @@ mount -o bind /dev/pts ${__ROOTFS_DIR}/dev/pts mount -o bind /sys ${__ROOTFS_DIR}/sys mount -o bind ${CORECLR_DIR} ${__ROOTFS_DIR}${ARM_CHROOT_HOME_DIR} +# Test environment emulation using docker and qemu has some problem to use lttng library. +# We should remove libcoreclrtraceptprovider.so to avoid test hang. +rm -f ${__ROOTFS_DIR}${ARM_CHROOT_HOME_DIR}/bin/Product/${__buildDirName}/libcoreclrtraceptprovider.so + chroot ${__ROOTFS_DIR} /bin/bash -x <<EOF cd ${ARM_CHROOT_HOME_DIR} ./tests/runtest.sh --sequential\ |