diff options
author | Egor Chesakov <Egor.Chesakov@microsoft.com> | 2018-12-03 14:51:28 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-03 14:51:28 -0800 |
commit | 20c6bc555319aa635e0e490c82aebf0bb370d6c1 (patch) | |
tree | 5a7399f6752a05abc7fdac987cabe81ca9d526ce /build.sh | |
parent | a089f64a7ad55a8ce0b3203b1bf87040775dff01 (diff) | |
download | coreclr-20c6bc555319aa635e0e490c82aebf0bb370d6c1.tar.gz coreclr-20c6bc555319aa635e0e490c82aebf0bb370d6c1.tar.bz2 coreclr-20c6bc555319aa635e0e490c82aebf0bb370d6c1.zip |
Remove Hostx86/arm CrossGen from building and Simplify build.sh command line arguments for Linux/arm cross build (Part 2) (#21034)
* Stop building and publishing Hostx86/arm crossgen on Linux/arm
* Remove -crosscomponent argument and stop using CAC_ROOTFS_DIR environment variable in build.sh
* Simplify the related logic in build.sh
* Don't need to specify crosscomponent in tests/scripts/run-pmi-diffs.py
* Don't set CAC_ROOTFS_DIR in buildpipeline, Jenkins files and in tests/scripts/run-pmi-diffs.py
* Adjust documentation
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 51 |
1 files changed, 7 insertions, 44 deletions
@@ -13,7 +13,6 @@ if [ "$PYTHON" == "" ] ; then exit 1 fi fi - # validate python-dependency # useful in case of explicitly set option. if ! command -v $PYTHON > /dev/null @@ -337,10 +336,8 @@ build_native() build_cross_architecture_components() { - local crossArch="$1" - - local intermediatesForBuild="$__IntermediatesDir/Host$crossArch/crossgen" - local crossArchBinDir="$__BinDir/$crossArch" + local intermediatesForBuild="$__IntermediatesDir/Host$__CrossArch/crossgen" + local crossArchBinDir="$__BinDir/$__CrossArch" mkdir -p "$intermediatesForBuild" mkdir -p "$crossArchBinDir" @@ -348,21 +345,10 @@ build_cross_architecture_components() generate_event_logging_sources "$intermediatesForBuild" "the crossarch build system" __SkipCrossArchBuild=1 - TARGET_ROOTFS="" # check supported cross-architecture components host(__HostArch)/target(__BuildArch) pair - if [[ ("$__BuildArch" == "arm" || "$__BuildArch" == "armel") && "$crossArch" == "x86" ]]; then - export CROSSCOMPILE=0 + if [[ ("$__BuildArch" == "arm" || "$__BuildArch" == "armel") && ("$__CrossArch" == "x86" || "$__CrossArch" == "x64") ]]; then __SkipCrossArchBuild=0 - - # building x64-host/arm-target cross-architecture component need to use cross toolchain of x86 - if [ "$__HostArch" == "x64" ]; then - export CROSSCOMPILE=1 - fi - elif [[ ("$__BuildArch" == "arm64") && "$crossArch" == "x64" ]]; then - export CROSSCOMPILE=0 - __SkipCrossArchBuild=0 - elif [[ ("$__BuildArch" == "arm" || "$__BuildArch" == "armel") && "$crossArch" == "x64" ]]; then - export CROSSCOMPILE=0 + elif [[ "$__BuildArch" == "arm64" && "$__CrossArch" == "x64" ]]; then __SkipCrossArchBuild=0 else # not supported @@ -370,24 +356,11 @@ build_cross_architecture_components() fi export __CMakeBinDir="$crossArchBinDir" - export CROSSCOMPONENT=1 - - if [ $CROSSCOMPILE == 1 ]; then - TARGET_ROOTFS="$ROOTFS_DIR" - if [ -n "$CAC_ROOTFS_DIR" ]; then - export ROOTFS_DIR="$CAC_ROOTFS_DIR" - else - export ROOTFS_DIR="$__ProjectRoot/cross/rootfs/$__CrossArch" - fi - fi + export CROSSCOMPILE=0 __ExtraCmakeArgs="-DCLR_CMAKE_TARGET_ARCH=$__BuildArch -DCLR_CMAKE_TARGET_OS=$__BuildOS -DCLR_CMAKE_PACKAGES_DIR=$__PackagesDir -DCLR_CMAKE_PGO_INSTRUMENT=$__PgoInstrument -DCLR_CMAKE_OPTDATA_VERSION=$__PgoOptDataVersion -DCLR_CMAKE_PGO_OPTIMIZE=$__PgoOptimize -DCLR_CROSS_COMPONENTS_BUILD=1" - build_native $__SkipCrossArchBuild "$crossArch" "$intermediatesForBuild" "$__ExtraCmakeArgs" "cross-architecture components" + build_native $__SkipCrossArchBuild "$__CrossArch" "$intermediatesForBuild" "$__ExtraCmakeArgs" "cross-architecture components" - # restore ROOTFS_DIR and CROSSCOMPILE - if [ -n "$TARGET_ROOTFS" ]; then - export ROOTFS_DIR="$TARGET_ROOTFS" - fi export CROSSCOMPILE=1 } @@ -840,11 +813,6 @@ while :; do __SkipCoreCLR=1 ;; - crosscomponent|-crosscomponent) - # Accept "crosscomponent" for backward-compatibility but ignore it. - echo "WARNING: 'crosscomponent' is obsolete and should not be used" - ;; - skipmanaged|-skipmanaged) __SkipManaged=1 ;; @@ -1049,12 +1017,7 @@ build_native $__SkipCoreCLR "$__BuildArch" "$__IntermediatesDir" "$__ExtraCmakeA # Build cross-architecture components if [[ $__CrossBuild == 1 ]]; then - build_cross_architecture_components "$__CrossArch" - - # For now, continue building Hostx86/arm crossgen - if [[ "$__HostArch" == "x64" && "$__BuildArch" == "arm" ]]; then - build_cross_architecture_components "x86" - fi + build_cross_architecture_components fi # Build System.Private.CoreLib. |