1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-10 01:50:53 +09:00

Use eng/common/native/init-os-and-arch.sh instead of eng/native/init-os-and-arch.sh (#97967)

This commit is contained in:
Filip Navara 2024-02-05 15:20:07 +01:00 committed by GitHub
parent e3c25ee510
commit 4cff20f61f
Signed by: github
GPG key ID: B5690EEEBB952194
9 changed files with 10 additions and 90 deletions

View file

@ -158,7 +158,7 @@ extraargs=''
crossBuild=0
portableBuild=1
source $scriptroot/native/init-os-and-arch.sh
source $scriptroot/common/native/init-os-and-arch.sh
hostArch=$arch

View file

@ -11,7 +11,7 @@ set -e
os="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
if [ -z "$os" ]; then
. "$(dirname "$0")"/native/init-os-and-arch.sh
. "$(dirname "$0")"/common/native/init-os-and-arch.sh
fi
case "$os" in

View file

@ -282,7 +282,7 @@ usage()
exit 1
}
source "$__RepoRootDir/eng/native/init-os-and-arch.sh"
source "$__RepoRootDir/eng/common/native/init-os-and-arch.sh"
__TargetArch=$arch
__TargetOS=$os

View file

@ -1,80 +0,0 @@
#!/usr/bin/env bash
# Use uname to determine what the OS is.
OSName=$(uname -s | tr '[:upper:]' '[:lower:]')
if command -v getprop && getprop ro.product.system.model 2>&1 | grep -qi android; then
OSName="android"
fi
case "$OSName" in
freebsd|linux|netbsd|openbsd|sunos|android|haiku)
os="$OSName" ;;
darwin)
os=osx ;;
*)
echo "Unsupported OS $OSName detected!"
exit 1 ;;
esac
# On Solaris, `uname -m` is discouraged, see https://docs.oracle.com/cd/E36784_01/html/E36870/uname-1.html
# and `uname -p` returns processor type (e.g. i386 on amd64).
# The appropriate tool to determine CPU is isainfo(1) https://docs.oracle.com/cd/E36784_01/html/E36870/isainfo-1.html.
if [ "$os" = "sunos" ]; then
if uname -o 2>&1 | grep -q illumos; then
os="illumos"
else
os="solaris"
fi
CPUName=$(isainfo -n)
else
# For the rest of the operating systems, use uname(1) to determine what the CPU is.
CPUName=$(uname -m)
fi
case "$CPUName" in
arm64|aarch64)
arch=arm64
;;
loongarch64)
arch=loongarch64
;;
riscv64)
arch=riscv64
;;
amd64|x86_64)
arch=x64
;;
armv7l|armv8l)
if (NAME=""; . /etc/os-release; test "$NAME" = "Tizen"); then
arch=armel
else
arch=arm
fi
;;
armv6l)
arch=armv6
;;
i[3-6]86)
echo "Unsupported CPU $CPUName detected, build might not succeed!"
arch=x86
;;
s390x)
arch=s390x
;;
ppc64le)
arch=ppc64le
;;
*)
echo "Unknown CPU $CPUName detected!"
exit 1
;;
esac

View file

@ -3,8 +3,8 @@ DOTNET:=$(TOP)dotnet.sh
DOTNET_Q_ARGS=--nologo -v:q -consoleloggerparameters:NoSummary
MONO_CONFIG?=Debug
MONO_ARCH?=$(shell . $(TOP)eng/native/init-os-and-arch.sh && echo $${arch})
TARGET_OS?=$(shell . $(TOP)eng/native/init-os-and-arch.sh && echo $${os})
MONO_ARCH?=$(shell . $(TOP)eng/common/native/init-os-and-arch.sh && echo $${arch})
TARGET_OS?=$(shell . $(TOP)eng/common/native/init-os-and-arch.sh && echo $${os})
AOT?=false
USE_LLVM?=false
StripILCode?=false

View file

@ -3,7 +3,7 @@
TOP=../../../../
BUILD_CONFIG?=Debug
TARGET_ARCH?=$(shell . $(TOP)eng/native/init-os-and-arch.sh && echo $${arch})
TARGET_ARCH?=$(shell . $(TOP)eng/common/native/init-os-and-arch.sh && echo $${arch})
TARGET_OS?=iossimulator
DEPLOY_AND_RUN?=false
STRIP_DEBUG_SYMBOLS?=false

View file

@ -1,6 +1,6 @@
TOP=../../../../../
CONFIG?=Debug
MONO_ARCH?=$(shell . $(TOP)eng/native/init-os-and-arch.sh && echo $${arch})
MONO_ARCH?=$(shell . $(TOP)eng/common/native/init-os-and-arch.sh && echo $${arch})
DOTNET:=$(TOP)dotnet.sh
run-sim:

View file

@ -6,8 +6,8 @@ DOTNET_Q_ARGS=--nologo -v:q -consoleloggerparameters:NoSummary
CONFIG ?=Debug
# How was dotnet/runtime built? should be the same as build.sh -c option
BUILT_RUNTIME_CONFIG ?= Release
MONO_ARCH?=$(shell . $(TOP)eng/native/init-os-and-arch.sh && echo $${arch})
TARGET_OS?=$(shell . $(TOP)eng/native/init-os-and-arch.sh && echo $${os})
MONO_ARCH?=$(shell . $(TOP)eng/common/native/init-os-and-arch.sh && echo $${arch})
TARGET_OS?=$(shell . $(TOP)eng/common/native/init-os-and-arch.sh && echo $${os})
MONO_ENV_OPTIONS = --interp

View file

@ -50,7 +50,7 @@ readonly EXIT_CODE_TEST_FAILURE=2 # Script completed successfully, but one or m
scriptPath="$(cd "$(dirname "$BASH_SOURCE[0]")"; pwd -P)"
repoRootDir="$(cd "$scriptPath"/../..; pwd -P)"
source "$repoRootDir/eng/native/init-os-and-arch.sh"
source "$repoRootDir/eng/common/native/init-os-and-arch.sh"
# Argument variables
buildArch="$arch"