Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync eng/native from dotnet/runtime #4178

Merged
merged 6 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 14 additions & 14 deletions diagnostics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ extends:
Build_Release:
_BuildConfig: Release
_BuildArch: x64
_PublishArtifacts: bin/Linux.x64.Release
_PublishArtifacts: bin/linux.x64.Release
${{ if in(variables['Build.Reason'], 'PullRequest') }}:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
_PublishArtifacts: bin/Linux.x64.Debug
_PublishArtifacts: bin/linux.x64.Debug

- template: /eng/pipelines/build.yml
parameters:
Expand All @@ -153,14 +153,14 @@ extends:
Build_Release:
_BuildConfig: Release
_BuildArch: x64
_PublishArtifacts: bin/Linux.x64.Release
_ArtifactsTargetPath: bin/Linux-musl.x64.Release
_PublishArtifacts: bin/linux.x64.Release
_ArtifactsTargetPath: bin/linux-musl.x64.Release
${{ if in(variables['Build.Reason'], 'PullRequest') }}:
Build_Debug:
_BuildConfig: Debug
_BuildArch: x64
_PublishArtifacts: bin/Linux.x64.Debug
_ArtifactsTargetPath: bin/Linux-musl.x64.Debug
_PublishArtifacts: bin/linux.x64.Debug
_ArtifactsTargetPath: bin/linux-musl.x64.Debug

- template: /eng/pipelines/build.yml
parameters:
Expand All @@ -171,7 +171,7 @@ extends:
Build_Release:
_BuildConfig: Release
_BuildArch: x64
_PublishArtifacts: bin/OSX.x64.Release
_PublishArtifacts: bin/osx.x64.Release
${{ if in(variables['Build.Reason'], 'PullRequest') }}:
Build_Debug:
_BuildConfig: Debug
Expand All @@ -188,7 +188,7 @@ extends:
Build_Release:
_BuildConfig: Release
_BuildArch: arm64
_PublishArtifacts: bin/OSX.arm64.Release
_PublishArtifacts: bin/osx.arm64.Release
${{ if in(variables['Build.Reason'], 'PullRequest') }}:
Build_Debug:
_BuildConfig: Debug
Expand All @@ -207,7 +207,7 @@ extends:
Build_Release:
_BuildConfig: Release
_BuildArch: arm
_PublishArtifacts: bin/Linux.arm.Release
_PublishArtifacts: bin/linux.arm.Release

- template: /eng/pipelines/build.yml
parameters:
Expand All @@ -221,7 +221,7 @@ extends:
Build_Release:
_BuildConfig: Release
_BuildArch: arm64
_PublishArtifacts: bin/Linux.arm64.Release
_PublishArtifacts: bin/linux.arm64.Release

- template: /eng/pipelines/build.yml
parameters:
Expand All @@ -236,8 +236,8 @@ extends:
Build_Release:
_BuildConfig: Release
_BuildArch: arm
_PublishArtifacts: bin/Linux.arm.Release
_ArtifactsTargetPath: bin/Linux-musl.arm.Release
_PublishArtifacts: bin/linux.arm.Release
_ArtifactsTargetPath: bin/linux-musl.arm.Release

- template: /eng/pipelines/build.yml
parameters:
Expand All @@ -252,8 +252,8 @@ extends:
Build_Release:
_BuildConfig: Release
_BuildArch: arm64
_PublishArtifacts: bin/Linux.arm64.Release
_ArtifactsTargetPath: bin/Linux-musl.arm64.Release
_PublishArtifacts: bin/linux.arm64.Release
_ArtifactsTargetPath: bin/linux-musl.arm64.Release

############################
# #
Expand Down
36 changes: 12 additions & 24 deletions eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# Obtain the location of the bash script to figure out where the root of the repo is.
__RepoRootDir="$(cd "$(dirname "$0")"/..; pwd -P)"

__BuildArch=x64
__BuildType=Debug
__CMakeArgs=
__CommonMSBuildArgs=
Expand All @@ -16,8 +15,6 @@ __CrossBuild=0
__DotnetRuntimeDownloadVersion="default"
__DotnetRuntimeVersion="default"
__ExtraCmakeArgs=
__HostArch=x64
__HostOS=Linux
__IsMSBuildOnNETCoreSupported=0
__ManagedBuild=1
__ManagedBuildArgs=
Expand All @@ -30,7 +27,6 @@ __RuntimeSourceFeed=
__RuntimeSourceFeedKey=
__SkipConfigure=0
__SkipGenerateVersion=0
__TargetOS=Linux
__Test=0
__UnprocessedBuildArgs=

Expand All @@ -44,7 +40,7 @@ handle_arguments() {
lowerI="$(echo "${1/--/-}" | tr "[:upper:]" "[:lower:]")"
case "$lowerI" in
architecture|-architecture|-a)
__BuildArch="$(echo "$2" | tr "[:upper:]" "[:lower:]")"
__TargetArch="$(echo "$2" | tr "[:upper:]" "[:lower:]")"
__ShiftArgs=1
;;

Expand Down Expand Up @@ -113,7 +109,7 @@ handle_arguments() {
source "$__RepoRootDir"/eng/native/build-commons.sh

__LogsDir="$__RootBinDir/log/$__BuildType"
__ConfigTriplet="$__TargetOS.$__BuildArch.$__BuildType"
__ConfigTriplet="$__TargetOS.$__TargetArch.$__BuildType"
__BinDir="$__RootBinDir/bin/$__ConfigTriplet"
__ArtifactsIntermediatesDir="$__RootBinDir/obj"
__IntermediatesDir="$__ArtifactsIntermediatesDir/$__ConfigTriplet"
Expand All @@ -134,7 +130,7 @@ __ExtraCmakeArgs="$__CMakeArgs $__ExtraCmakeArgs -DCLR_MANAGED_BINARY_DIR=$__Roo
export __CMakeBinDir="$__BinDir"


if [[ "$__BuildArch" == "armel" ]]; then
if [[ "$__TargetArch" == "armel" ]]; then
# Armel cross build is Tizen specific and does not support Portable RID build
__PortableBuild=0
fi
Expand Down Expand Up @@ -163,7 +159,7 @@ if [[ "$__ManagedBuild" == 1 ]]; then
/p:GenerateVersionSourceFile=true \
/p:NativeVersionSourceFile="$__ArtifactsIntermediatesDir/_version.c" \
/p:Configuration="$__BuildType" \
/p:Platform="$__BuildArch" \
/p:Platform="$__TargetArch" \
$__UnprocessedBuildArgs

if [ $? != 0 ]; then
Expand All @@ -172,19 +168,11 @@ if [[ "$__ManagedBuild" == 1 ]]; then
fi
fi

#
# Initialize the target distro name
#

initTargetDistroRid

echo "RID: $__DistroRid"

#
# Setup LLDB paths for native build
#

if [ "$__HostOS" == "OSX" ]; then
if [ "$__HostOS" == "osx" ]; then
export LLDB_H="$__RepoRootDir"/src/SOS/lldbplugin/swift-4.0
export LLDB_LIB=$(xcode-select -p)/../SharedFrameworks/LLDB.framework/LLDB
export LLDB_PATH=$(xcode-select -p)/usr/bin/lldb
Expand All @@ -201,12 +189,12 @@ if [ "$__HostOS" == "OSX" ]; then
which python
python --version

if [[ "$__BuildArch" == x64 ]]; then
if [[ "$__TargetArch" == x64 ]]; then
__ExtraCmakeArgs="-DCMAKE_OSX_ARCHITECTURES=\"x86_64\" $__ExtraCmakeArgs"
elif [[ "$__BuildArch" == arm64 ]]; then
elif [[ "$__TargetArch" == arm64 ]]; then
__ExtraCmakeArgs="-DCMAKE_OSX_ARCHITECTURES=\"arm64\" $__ExtraCmakeArgs"
else
echo "Error: Unknown OSX architecture $__BuildArch."
echo "Error: Unknown OSX architecture $__TargetArch."
exit 1
fi
fi
Expand All @@ -215,7 +203,7 @@ fi
# Build native components
#
if [[ "$__NativeBuild" == 1 ]]; then
build_native "$__TargetOS" "$__BuildArch" "$__RepoRootDir" "$__IntermediatesDir" "install" "$__ExtraCmakeArgs" "diagnostic component" | tee "$__LogsDir"/make.log
build_native "$__TargetOS" "$__TargetArch" "$__RepoRootDir" "$__IntermediatesDir" "install" "$__ExtraCmakeArgs" "diagnostic component" | tee "$__LogsDir"/make.log

if [ "$?" != 0 ]; then
echo "Native build FAILED"
Expand All @@ -229,8 +217,8 @@ fi

if [[ "$__NativeBuild" == 1 || "$__Test" == 1 ]]; then
__targetRid=net6.0
__dotnet_sos=$__RootBinDir/bin/dotnet-sos/$__BuildType/$__targetRid/publish/$__DistroRid
__dotnet_dump=$__RootBinDir/bin/dotnet-dump/$__BuildType/$__targetRid/publish/$__DistroRid
__dotnet_sos=$__RootBinDir/bin/dotnet-sos/$__BuildType/$__targetRid/publish/$__OutputRid
__dotnet_dump=$__RootBinDir/bin/dotnet-dump/$__BuildType/$__targetRid/publish/$__OutputRid

mkdir -p "$__dotnet_sos"
mkdir -p "$__dotnet_dump"
Expand Down Expand Up @@ -290,7 +278,7 @@ if [[ "$__Test" == 1 ]]; then
--test \
--configuration "$__BuildType" \
/bl:"$__LogsDir"/Test.binlog \
/p:BuildArch="$__BuildArch" \
/p:BuildArch="$__TargetArch" \
/p:PrivateBuildPath="$__PrivateBuildPath" \
/p:DotnetRuntimeVersion="$__DotnetRuntimeVersion" \
/p:DotnetRuntimeDownloadVersion="$__DotnetRuntimeDownloadVersion" \
Expand Down
Loading