mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 01:41:17 -10:00
Compare commits
43
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71a7ae4bf0 | ||
|
|
8824ac84fd | ||
|
|
c49104e842 | ||
|
|
071b7259d5 | ||
|
|
742c414bde | ||
|
|
4cd05a7be4 | ||
|
|
b0c434280d | ||
|
|
72fe53a2ee | ||
|
|
900e77c868 | ||
|
|
8082e87c4e | ||
|
|
1635c21e59 | ||
|
|
96e64ad4e6 | ||
|
|
0c200c5125 | ||
|
|
d9e090e867 | ||
|
|
081498393a | ||
|
|
a40e1ae681 | ||
|
|
88c44e26f6 | ||
|
|
b2ad5f34e1 | ||
|
|
7936510ec3 | ||
|
|
6fe343db8c | ||
|
|
4cb6ca5599 | ||
|
|
8ce81f5113 | ||
|
|
dd151fea35 | ||
|
|
32826eb418 | ||
|
|
a2d1aec5d2 | ||
|
|
31c12db374 | ||
|
|
0e49716ff8 | ||
|
|
b8369e630c | ||
|
|
64eacfa900 | ||
|
|
2c8371c221 | ||
|
|
ab2321c1dc | ||
|
|
e9830fac8d | ||
|
|
8027746aea | ||
|
|
71ad5a0771 | ||
|
|
2f74ab393f | ||
|
|
b5fb8dbe6a | ||
|
|
44fe895ab0 | ||
|
|
2017e493a9 | ||
|
|
a592b4b871 | ||
|
|
303122e94a | ||
|
|
088692ff3a | ||
|
|
8d00b7cd8b | ||
|
|
cdb7944e7b |
No files matched your search
+2
-1
@@ -116,6 +116,8 @@
|
||||
|
||||
/mono/sgen @BrzVlad @lambdageek
|
||||
|
||||
/mono/tools/offsets-tool @lewurm @rolfbjarne
|
||||
|
||||
/mono/utils @vargaz @lewurm @lambdageek
|
||||
/mono/utils/atomic* @lewurm @vargaz
|
||||
/mono/utils/mono-hwcap* @lewurm @vargaz
|
||||
@@ -156,6 +158,5 @@
|
||||
/tools @lambdageek @vargaz
|
||||
/tools/locale-builder @marek-safar @egorbo
|
||||
/tools/nuget-hash-extractor @marek-safar @radical @akoeplinger
|
||||
/tools/offsets-tool @lewurm @rolfbjarne
|
||||
/tools/pedump @lambdageek @lewurm
|
||||
/tools/sgen @brzvlad @vargaz @naricc
|
||||
@@ -139,8 +139,6 @@ llvm/usr/
|
||||
sdks/builds/llvm-*/
|
||||
sdks/builds/android-*/
|
||||
mcs/build/compiler-server.log
|
||||
tools/offsets-tool-py/offtool/
|
||||
tools/offsets-tool-py/clang/__pycache__
|
||||
|
||||
##############################################################################
|
||||
# Arcade output directories
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ AM_CFLAGS = $(WERROR_CFLAGS)
|
||||
|
||||
SUBDIRS = @MONO_SUBDIRS@
|
||||
noinst_SUBDIRS = @MONO_NOINST_SUBDIRS@
|
||||
DIST_SUBDIRS = $(SUBDIRS) m4 netcore netcore/corerun
|
||||
DIST_SUBDIRS = $(SUBDIRS) m4 netcore
|
||||
|
||||
if !ENABLE_NETCORE
|
||||
|
||||
|
||||
+21
-2
@@ -4,7 +4,7 @@
|
||||
# This line is parsed by tools besides autoconf, such as msvc/mono.winconfig.targets.
|
||||
# It should remain in the format they expect.
|
||||
#
|
||||
AC_INIT(mono, [6.11.0],
|
||||
AC_INIT(mono, [6.13.0],
|
||||
[https://github.com/mono/mono/issues/new])
|
||||
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
@@ -1362,7 +1362,9 @@ MONO_LLVM_PATH_OPTION=llvm-path="`pwd`/llvm/usr/bin"
|
||||
|
||||
if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
elif test x$with_runtime_preset = xnetcore; then
|
||||
fi
|
||||
|
||||
if test x$with_runtime_preset = xnetcore; then
|
||||
# Keep in sync with winconfig.h netcore configuration.
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
BTLS_SUPPORTED=no
|
||||
@@ -2936,6 +2938,23 @@ if test x$host_win32 = xno; then
|
||||
])
|
||||
fi
|
||||
|
||||
dnl ********************************
|
||||
dnl *** Checks for sys_signame ***
|
||||
dnl ********************************
|
||||
AC_MSG_CHECKING(for sys_signame)
|
||||
AC_TRY_LINK([
|
||||
#include <signal.h>
|
||||
], [
|
||||
const char *signame = sys_signame[0];
|
||||
], [
|
||||
# Yes, we have it...
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_SYSSIGNAME, 1, [Have sys_signame])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
|
||||
dnl ********************************
|
||||
dnl *** Checks for semaphore lib ***
|
||||
dnl ********************************
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
</Dependency>
|
||||
</ProductDependencies>
|
||||
<ToolsetDependencies>
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20076.3">
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20109.1">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>cc8fe69635c7c6e791c87540851aea75946945fa</Sha>
|
||||
<Sha>b0e8d3944155f94f83deea8afe025debe369e69f</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.20076.3">
|
||||
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.20109.1">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>cc8fe69635c7c6e791c87540851aea75946945fa</Sha>
|
||||
<Sha>b0e8d3944155f94f83deea8afe025debe369e69f</Sha>
|
||||
</Dependency>
|
||||
</ToolsetDependencies>
|
||||
</Dependencies>
|
||||
@@ -24,13 +24,15 @@ function InstallDarcCli ($darcVersion) {
|
||||
$darcVersion = $(Invoke-WebRequest -Uri $versionEndpoint -UseBasicParsing).Content
|
||||
}
|
||||
|
||||
$arcadeServicesSource = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
||||
$arcadeServicesSource = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
|
||||
Write-Host "Installing Darc CLI version $darcVersion..."
|
||||
Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.'
|
||||
if (-not $toolpath) {
|
||||
Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity -g"
|
||||
& "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g
|
||||
}else {
|
||||
Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity -g --tool-path '$toolpath'"
|
||||
& "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ Param(
|
||||
[Parameter(Mandatory=$true)][string] $gitHubPat, # GitHub personal access token from https://github.com/settings/tokens (no auth scopes needed)
|
||||
[Parameter(Mandatory=$true)][string] $azdoPat, # Azure Dev Ops tokens from https://dev.azure.com/dnceng/_details/security/tokens (code read scope needed)
|
||||
[Parameter(Mandatory=$true)][string] $outputFolder, # Where the graphviz.txt file will be created
|
||||
[string] $darcVersion = '1.1.0-beta.19175.6', # darc's version
|
||||
[string] $darcVersion, # darc's version
|
||||
[string] $graphvizVersion = '2.38', # GraphViz version
|
||||
[switch] $includeToolset # Whether the graph should include toolset dependencies or not. i.e. arcade, optimization. For more about
|
||||
# toolset dependencies see https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#toolset-vs-product-dependencies
|
||||
|
||||
@@ -9,12 +9,12 @@ Param(
|
||||
[string] $Branch=$env:BUILD_SOURCEBRANCH,
|
||||
[string] $CommitSha=$env:BUILD_SOURCEVERSION,
|
||||
[string] $BuildNumber=$env:BUILD_BUILDNUMBER,
|
||||
[string] $RunCategories="coreclr corefx",
|
||||
[string] $RunCategories="Libraries Runtime",
|
||||
[string] $Csproj="src\benchmarks\micro\MicroBenchmarks.csproj",
|
||||
[string] $Kind="micro",
|
||||
[switch] $Internal,
|
||||
[switch] $Compare,
|
||||
[string] $Configurations="CompilationMode=$CompilationMode"
|
||||
[string] $Configurations="CompilationMode=$CompilationMode RunKind=$Kind"
|
||||
)
|
||||
|
||||
$RunFromPerformanceRepo = ($Repository -eq "dotnet/performance") -or ($Repository -eq "dotnet-performance")
|
||||
@@ -50,7 +50,7 @@ if ($Internal) {
|
||||
}
|
||||
|
||||
# FIX ME: This is a workaround until we get this from the actual pipeline
|
||||
$CommonSetupArguments="--channel master --queue $Queue --build-number $BuildNumber --build-configs $Configurations"
|
||||
$CommonSetupArguments="--channel master --queue $Queue --build-number $BuildNumber --build-configs $Configurations --architecture $Architecture"
|
||||
$SetupArguments = "--repository https://github.com/$Repository --branch $Branch --get-perf-hash --commit-sha $CommitSha $CommonSetupArguments"
|
||||
|
||||
if ($RunFromPerformanceRepo) {
|
||||
|
||||
@@ -13,9 +13,9 @@ build_number=$BUILD_BUILDNUMBER
|
||||
internal=false
|
||||
compare=false
|
||||
kind="micro"
|
||||
run_categories="coreclr corefx"
|
||||
run_categories="Libraries Runtime"
|
||||
csproj="src\benchmarks\micro\MicroBenchmarks.csproj"
|
||||
configurations=
|
||||
configurations="CompliationMode=$compilation_mode RunKind=$kind"
|
||||
run_from_perf_repo=false
|
||||
use_core_run=true
|
||||
use_baseline_core_run=true
|
||||
@@ -164,7 +164,7 @@ if [[ "$internal" == true ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
common_setup_arguments="--channel master --queue $queue --build-number $build_number --build-configs $configurations"
|
||||
common_setup_arguments="--channel master --queue $queue --build-number $build_number --build-configs $configurations --architecture $architecture"
|
||||
setup_arguments="--repository https://github.com/$repository --branch $branch --get-perf-hash --commit-sha $commit_sha $common_setup_arguments"
|
||||
|
||||
if [[ "$run_from_perf_repo" = true ]]; then
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ try {
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
# Get info about which channels the build has already been promoted to
|
||||
# Get info about which channel(s) the build has already been promoted to
|
||||
$buildInfo = Get-MaestroBuild -BuildId $BuildId
|
||||
|
||||
if (!$buildInfo) {
|
||||
@@ -1,4 +1,5 @@
|
||||
parameters:
|
||||
enable: 'false' # Whether the SDL validation job should execute or not
|
||||
overrideParameters: '' # Optional: to override values for parameters.
|
||||
additionalParameters: '' # Optional: parameters that need user specific values eg: '-SourceToolsList @("abc","def") -ArtifactToolsList @("ghi","jkl")'
|
||||
# There is some sort of bug (has been reported) in Azure DevOps where if this parameter is named
|
||||
@@ -16,8 +17,15 @@ jobs:
|
||||
- job: Run_SDL
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
displayName: Run SDL tool
|
||||
condition: eq( ${{ parameters.enable }}, 'true')
|
||||
variables:
|
||||
- group: DotNet-VSTS-Bot
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
pool:
|
||||
name: Hosted VS2017
|
||||
steps:
|
||||
@@ -28,14 +36,22 @@ jobs:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Build Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
artifactName: ${{ artifactName }}
|
||||
downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
|
||||
- ${{ if eq(parameters.artifactNames, '') }}:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Build Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
downloadType: specific files
|
||||
itemPattern: "**"
|
||||
downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
|
||||
|
||||
@@ -23,9 +23,15 @@ stages:
|
||||
- job: publish_symbols
|
||||
displayName: Symbol Publishing
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} ))
|
||||
condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
|
||||
variables:
|
||||
- group: DotNet-Symbol-Server-Pats
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
@@ -33,10 +39,14 @@ stages:
|
||||
displayName: Download Build Assets
|
||||
continueOnError: true
|
||||
inputs:
|
||||
buildType: 'current'
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
downloadType: 'specific'
|
||||
itemPattern: |
|
||||
PDBArtifacts/**
|
||||
PdbArtifacts/**
|
||||
BlobArtifacts/**
|
||||
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
@@ -79,7 +89,13 @@ stages:
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
- name: IsStableBuild
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }}))
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
@@ -87,7 +103,11 @@ stages:
|
||||
displayName: Download Build Assets
|
||||
continueOnError: true
|
||||
inputs:
|
||||
buildType: 'current'
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
downloadType: 'specific'
|
||||
itemPattern: |
|
||||
PackageArtifacts/**
|
||||
@@ -146,6 +166,6 @@ stages:
|
||||
StageLabel: '${{ parameters.stageName }}'
|
||||
JobLabel: 'AssetsPublishing'
|
||||
|
||||
- template: ../../steps/promote-build.yml
|
||||
- template: ../../steps/add-build-to-channel.yml
|
||||
parameters:
|
||||
ChannelId: ${{ parameters.channelId }}
|
||||
@@ -23,9 +23,15 @@ stages:
|
||||
- job: publish_symbols
|
||||
displayName: Symbol Publishing
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} ))
|
||||
condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
|
||||
variables:
|
||||
- group: DotNet-Symbol-Server-Pats
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
@@ -33,10 +39,14 @@ stages:
|
||||
displayName: Download Build Assets
|
||||
continueOnError: true
|
||||
inputs:
|
||||
buildType: 'current'
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
downloadType: 'specific'
|
||||
itemPattern: |
|
||||
PDBArtifacts/**
|
||||
PdbArtifacts/**
|
||||
BlobArtifacts/**
|
||||
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
@@ -78,7 +88,13 @@ stages:
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
- name: IsStableBuild
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }}))
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
@@ -86,7 +102,11 @@ stages:
|
||||
displayName: Download Build Assets
|
||||
continueOnError: true
|
||||
inputs:
|
||||
buildType: 'current'
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
downloadType: 'specific'
|
||||
itemPattern: |
|
||||
PackageArtifacts/**
|
||||
@@ -145,6 +165,6 @@ stages:
|
||||
StageLabel: '${{ parameters.stageName }}'
|
||||
JobLabel: 'AssetsPublishing'
|
||||
|
||||
- template: ../../steps/promote-build.yml
|
||||
- template: ../../steps/add-build-to-channel.yml
|
||||
parameters:
|
||||
ChannelId: ${{ parameters.channelId }}
|
||||
@@ -26,97 +26,136 @@ stages:
|
||||
- stage: Validate
|
||||
dependsOn: ${{ parameters.validateDependsOn }}
|
||||
displayName: Validate
|
||||
variables:
|
||||
- template: common-variables.yml
|
||||
jobs:
|
||||
- ${{ if eq(parameters.enableNugetValidation, 'true') }}:
|
||||
- job:
|
||||
displayName: NuGet Validation
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
- template: setup-maestro-vars.yml
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Validate
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1
|
||||
arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/
|
||||
-ToolDestinationPath $(Agent.BuildDirectory)/Extract/
|
||||
- job:
|
||||
displayName: NuGet Validation
|
||||
dependsOn: setupMaestroVars
|
||||
condition: eq( ${{ parameters.enableNugetValidation }}, 'true')
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
variables:
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
- ${{ if eq(parameters.enableSigningValidation, 'true') }}:
|
||||
- job:
|
||||
displayName: Signing Validation
|
||||
variables:
|
||||
- template: common-variables.yml
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
- task: PowerShell@2
|
||||
displayName: Validate
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1
|
||||
arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/
|
||||
-ToolDestinationPath $(Agent.BuildDirectory)/Extract/
|
||||
|
||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
||||
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here
|
||||
# otherwise it'll complain about accessing a private feed.
|
||||
- task: NuGetAuthenticate@0
|
||||
displayName: 'Authenticate to AzDO Feeds'
|
||||
- job:
|
||||
displayName: Signing Validation
|
||||
dependsOn: setupMaestroVars
|
||||
condition: eq( ${{ parameters.enableSigningValidation }}, 'true')
|
||||
variables:
|
||||
- template: common-variables.yml
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Enable cross-org publishing
|
||||
inputs:
|
||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
||||
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here
|
||||
# otherwise it'll complain about accessing a private feed.
|
||||
- task: NuGetAuthenticate@0
|
||||
displayName: 'Authenticate to AzDO Feeds'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Validate
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task SigningValidation -restore -msbuildEngine dotnet
|
||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts'
|
||||
/p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt'
|
||||
${{ parameters.signingValidationAdditionalParameters }}
|
||||
- task: PowerShell@2
|
||||
displayName: Enable cross-org publishing
|
||||
inputs:
|
||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
|
||||
- template: ../steps/publish-logs.yml
|
||||
parameters:
|
||||
StageLabel: 'Validation'
|
||||
JobLabel: 'Signing'
|
||||
- task: PowerShell@2
|
||||
displayName: Validate
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task SigningValidation -restore -msbuildEngine dotnet
|
||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts'
|
||||
/p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt'
|
||||
${{ parameters.signingValidationAdditionalParameters }}
|
||||
|
||||
- ${{ if eq(parameters.enableSourceLinkValidation, 'true') }}:
|
||||
- job:
|
||||
displayName: SourceLink Validation
|
||||
variables:
|
||||
- template: common-variables.yml
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: BlobArtifacts
|
||||
- template: ../steps/publish-logs.yml
|
||||
parameters:
|
||||
StageLabel: 'Validation'
|
||||
JobLabel: 'Signing'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Validate
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1
|
||||
arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/
|
||||
-ExtractPath $(Agent.BuildDirectory)/Extract/
|
||||
-GHRepoName $(Build.Repository.Name)
|
||||
-GHCommit $(Build.SourceVersion)
|
||||
-SourcelinkCliVersion $(SourceLinkCLIVersion)
|
||||
continueOnError: true
|
||||
- job:
|
||||
displayName: SourceLink Validation
|
||||
dependsOn: setupMaestroVars
|
||||
condition: eq( ${{ parameters.enableSourceLinkValidation }}, 'true')
|
||||
variables:
|
||||
- template: common-variables.yml
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
artifactName: BlobArtifacts
|
||||
|
||||
- ${{ if eq(parameters.SDLValidationParameters.enable, 'true') }}:
|
||||
- template: /eng/common/templates/job/execute-sdl.yml
|
||||
parameters:
|
||||
additionalParameters: ${{ parameters.SDLValidationParameters.params }}
|
||||
continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }}
|
||||
artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }}
|
||||
- task: PowerShell@2
|
||||
displayName: Validate
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1
|
||||
arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/
|
||||
-ExtractPath $(Agent.BuildDirectory)/Extract/
|
||||
-GHRepoName $(Build.Repository.Name)
|
||||
-GHCommit $(Build.SourceVersion)
|
||||
-SourcelinkCliVersion $(SourceLinkCLIVersion)
|
||||
continueOnError: true
|
||||
|
||||
- template: /eng/common/templates/job/execute-sdl.yml
|
||||
parameters:
|
||||
enable: ${{ parameters.SDLValidationParameters.enable }}
|
||||
dependsOn: setupMaestroVars
|
||||
additionalParameters: ${{ parameters.SDLValidationParameters.params }}
|
||||
continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }}
|
||||
artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }}
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
parameters:
|
||||
ChannelId: 0
|
||||
|
||||
jobs:
|
||||
- job:
|
||||
displayName: Promote Build
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.ChannelId }}))
|
||||
variables:
|
||||
- name: BARBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
- name: ChannelId
|
||||
value: ${{ parameters.ChannelId }}
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: PowerShell@2
|
||||
displayName: Add Build to Channel
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/promote-build.ps1
|
||||
arguments: -BuildId $(BARBuildId)
|
||||
-ChannelId $(ChannelId)
|
||||
-MaestroApiAccessToken $(MaestroApiAccessToken)
|
||||
-MaestroApiEndPoint $(MaestroApiEndPoint)
|
||||
-MaestroApiVersion $(MaestroApiVersion)
|
||||
@@ -1,6 +1,12 @@
|
||||
jobs:
|
||||
- job: setupMaestroVars
|
||||
displayName: Setup Maestro Vars
|
||||
variables:
|
||||
- template: common-variables.yml
|
||||
- name: BuildId
|
||||
value: $[ coalesce(variables.BARBuildId, 0) ]
|
||||
- name: PromoteToChannelId
|
||||
value: $[ coalesce(variables.PromoteToMaestroChannelId, 0) ]
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
@@ -8,6 +14,7 @@ jobs:
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Release Configs
|
||||
condition: eq(variables.PromoteToChannelId, 0)
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: ReleaseConfigs
|
||||
@@ -19,18 +26,50 @@ jobs:
|
||||
targetType: inline
|
||||
script: |
|
||||
try {
|
||||
$Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt
|
||||
if ($Env:PromoteToChannelId -eq 0) {
|
||||
$Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt
|
||||
|
||||
$BarId = $Content | Select -Index 0
|
||||
$BarId = $Content | Select -Index 0
|
||||
|
||||
$Channels = ""
|
||||
$Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," }
|
||||
$Channels = ""
|
||||
$Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," }
|
||||
|
||||
$IsStableBuild = $Content | Select -Index 2
|
||||
|
||||
$IsStableBuild = $Content | Select -Index 2
|
||||
$AzureDevOpsProject = $Env:System_TeamProject
|
||||
$AzureDevOpsBuildDefinitionId = $Env:System_DefinitionId
|
||||
$AzureDevOpsBuildId = $Env:Build_BuildId
|
||||
$PromoteToMaestroChannelId = 0
|
||||
}
|
||||
else {
|
||||
$buildApiEndpoint = "${Env:MaestroApiEndPoint}/api/builds/${Env:BARBuildId}?api-version=${Env:MaestroApiVersion}"
|
||||
|
||||
$apiHeaders = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]'
|
||||
$apiHeaders.Add('Accept', 'application/json')
|
||||
$apiHeaders.Add('Authorization',"Bearer ${Env:MAESTRO_API_TOKEN}")
|
||||
|
||||
$buildInfo = try { Invoke-WebRequest -Method Get -Uri $buildApiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
|
||||
|
||||
$BarId = $Env:BARBuildId
|
||||
$Channels = 'None'
|
||||
|
||||
#TODO: Fix this once this issue is done: https://github.com/dotnet/arcade/issues/3834
|
||||
$IsStableBuild = 'False'
|
||||
|
||||
$AzureDevOpsProject = $buildInfo.azureDevOpsProject
|
||||
$AzureDevOpsBuildDefinitionId = $buildInfo.azureDevOpsBuildDefinitionId
|
||||
$AzureDevOpsBuildId = $buildInfo.azureDevOpsBuildId
|
||||
$PromoteToMaestroChannelId = $Env:PromoteToMaestroChannelId
|
||||
}
|
||||
|
||||
Write-Host "##vso[task.setvariable variable=BARBuildId;isOutput=true]$BarId"
|
||||
Write-Host "##vso[task.setvariable variable=InitialChannels;isOutput=true]$Channels"
|
||||
Write-Host "##vso[task.setvariable variable=IsStableBuild;isOutput=true]$IsStableBuild"
|
||||
|
||||
Write-Host "##vso[task.setvariable variable=AzDOProjectName;isOutput=true]$AzureDevOpsProject"
|
||||
Write-Host "##vso[task.setvariable variable=AzDOPipelineId;isOutput=true]$AzureDevOpsBuildDefinitionId"
|
||||
Write-Host "##vso[task.setvariable variable=AzDOBuildId;isOutput=true]$AzureDevOpsBuildId"
|
||||
Write-Host "##vso[task.setvariable variable=PromoteToMaestroChannelId;isOutput=true]$PromoteToMaestroChannelId"
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
@@ -38,3 +77,5 @@ jobs:
|
||||
Write-Host $_.ScriptStackTrace
|
||||
exit 1
|
||||
}
|
||||
env:
|
||||
MAESTRO_API_TOKEN: $(MaestroApiAccessToken)
|
||||
+2
-2
@@ -5,9 +5,9 @@ steps:
|
||||
- task: PowerShell@2
|
||||
displayName: Add Build to Channel
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/promote-build.ps1
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/add-build-to-channel.ps1
|
||||
arguments: -BuildId $(BARBuildId)
|
||||
-ChannelId ${{ parameters.ChannelId }}
|
||||
-MaestroApiAccessToken $(MaestroApiAccessToken)
|
||||
-MaestroApiEndPoint $(MaestroApiEndPoint)
|
||||
-MaestroApiVersion $(MaestroApiVersion)
|
||||
-MaestroApiVersion $(MaestroApiVersion)
|
||||
+37
-14
@@ -155,12 +155,12 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
|
||||
# The following code block is protecting against concurrent access so that this function can
|
||||
# be called in parallel.
|
||||
if ($createSdkLocationFile) {
|
||||
do {
|
||||
do {
|
||||
$sdkCacheFileTemp = Join-Path $ToolsetDir $([System.IO.Path]::GetRandomFileName())
|
||||
}
|
||||
}
|
||||
until (!(Test-Path $sdkCacheFileTemp))
|
||||
Set-Content -Path $sdkCacheFileTemp -Value $dotnetRoot
|
||||
|
||||
|
||||
try {
|
||||
Rename-Item -Force -Path $sdkCacheFileTemp 'sdk.txt'
|
||||
} catch {
|
||||
@@ -188,7 +188,33 @@ function GetDotNetInstallScript([string] $dotnetRoot) {
|
||||
if (!(Test-Path $installScript)) {
|
||||
Create-Directory $dotnetRoot
|
||||
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
|
||||
Invoke-WebRequest "https://dot.net/$dotnetInstallScriptVersion/dotnet-install.ps1" -OutFile $installScript
|
||||
|
||||
$maxRetries = 5
|
||||
$retries = 1
|
||||
|
||||
$uri = "https://dot.net/$dotnetInstallScriptVersion/dotnet-install.ps1"
|
||||
|
||||
while($true) {
|
||||
try {
|
||||
Write-Host "GET $uri"
|
||||
Invoke-WebRequest $uri -OutFile $installScript
|
||||
break
|
||||
}
|
||||
catch {
|
||||
Write-Host "Failed to download '$uri'"
|
||||
Write-Error $_.Exception.Message -ErrorAction Continue
|
||||
}
|
||||
|
||||
if (++$retries -le $maxRetries) {
|
||||
$delayInSeconds = [math]::Pow(2, $retries) - 1 # Exponential backoff
|
||||
Write-Host "Retrying. Waiting for $delayInSeconds seconds before next attempt ($retries of $maxRetries)."
|
||||
Start-Sleep -Seconds $delayInSeconds
|
||||
}
|
||||
else {
|
||||
throw "Unable to download file in $maxRetries attempts."
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return $installScript
|
||||
@@ -198,12 +224,12 @@ function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $arc
|
||||
InstallDotNet $dotnetRoot $version $architecture
|
||||
}
|
||||
|
||||
function InstallDotNet([string] $dotnetRoot,
|
||||
[string] $version,
|
||||
[string] $architecture = '',
|
||||
[string] $runtime = '',
|
||||
[bool] $skipNonVersionedFiles = $false,
|
||||
[string] $runtimeSourceFeed = '',
|
||||
function InstallDotNet([string] $dotnetRoot,
|
||||
[string] $version,
|
||||
[string] $architecture = '',
|
||||
[string] $runtime = '',
|
||||
[bool] $skipNonVersionedFiles = $false,
|
||||
[string] $runtimeSourceFeed = '',
|
||||
[string] $runtimeSourceFeedKey = '') {
|
||||
|
||||
$installScript = GetDotNetInstallScript $dotnetRoot
|
||||
@@ -298,7 +324,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
|
||||
$vsMajorVersion = $vsMinVersion.Major
|
||||
$xcopyMSBuildVersion = "$vsMajorVersion.$($vsMinVersion.Minor).0-alpha"
|
||||
}
|
||||
|
||||
|
||||
$vsInstallDir = $null
|
||||
if ($xcopyMSBuildVersion.Trim() -ine "none") {
|
||||
$vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install
|
||||
@@ -655,9 +681,6 @@ Write-PipelineSetVariable -Name 'Artifacts.Log' -Value $LogDir
|
||||
Write-PipelineSetVariable -Name 'TEMP' -Value $TempDir
|
||||
Write-PipelineSetVariable -Name 'TMP' -Value $TempDir
|
||||
|
||||
$env:TEMP=$TempDir
|
||||
$env:TMP=$TempDir
|
||||
|
||||
# Import custom tools configuration, if present in the repo.
|
||||
# Note: Import in global scope so that the script set top-level variables without qualification.
|
||||
if (!$disableConfigureToolsetImport) {
|
||||
|
||||
+30
-8
@@ -41,7 +41,7 @@ fi
|
||||
# Configures warning treatment in msbuild.
|
||||
warn_as_error=${warn_as_error:-true}
|
||||
|
||||
# True to attempt using .NET Core already that meets requirements specified in global.json
|
||||
# True to attempt using .NET Core already that meets requirements specified in global.json
|
||||
# installed on the machine instead of downloading one.
|
||||
use_installed_dotnet_cli=${use_installed_dotnet_cli:-true}
|
||||
|
||||
@@ -172,7 +172,7 @@ function InstallDotNetSdk {
|
||||
function InstallDotNet {
|
||||
local root=$1
|
||||
local version=$2
|
||||
|
||||
|
||||
GetDotNetInstallScript "$root"
|
||||
local install_script=$_GetDotNetInstallScript
|
||||
|
||||
@@ -218,6 +218,28 @@ function InstallDotNet {
|
||||
}
|
||||
}
|
||||
|
||||
function with_retries {
|
||||
local maxRetries=5
|
||||
local retries=1
|
||||
echo "Trying to run '$@' for maximum of $maxRetries attempts."
|
||||
while [[ $((retries++)) -le $maxRetries ]]; do
|
||||
"$@"
|
||||
|
||||
if [[ $? == 0 ]]; then
|
||||
echo "Ran '$@' successfully."
|
||||
return 0
|
||||
fi
|
||||
|
||||
timeout=$((2**$retries-1))
|
||||
echo "Failed to execute '$@'. Waiting $timeout seconds before next attempt ($retries out of $maxRetries)." 1>&2
|
||||
sleep $timeout
|
||||
done
|
||||
|
||||
echo "Failed to execute '$@' for $maxRetries times." 1>&2
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
function GetDotNetInstallScript {
|
||||
local root=$1
|
||||
local install_script="$root/dotnet-install.sh"
|
||||
@@ -230,13 +252,13 @@ function GetDotNetInstallScript {
|
||||
|
||||
# Use curl if available, otherwise use wget
|
||||
if command -v curl > /dev/null; then
|
||||
curl "$install_script_url" -sSL --retry 10 --create-dirs -o "$install_script" || {
|
||||
with_retries curl "$install_script_url" -isSLv --retry 10 --create-dirs -o "$install_script" || {
|
||||
local exit_code=$?
|
||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
|
||||
ExitWithExitCode $exit_code
|
||||
}
|
||||
else
|
||||
wget -q -O "$install_script" "$install_script_url" || {
|
||||
else
|
||||
with_retries wget -v -O "$install_script" "$install_script_url" || {
|
||||
local exit_code=$?
|
||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
|
||||
ExitWithExitCode $exit_code
|
||||
@@ -251,11 +273,11 @@ function InitializeBuildTool {
|
||||
if [[ -n "${_InitializeBuildTool:-}" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
||||
InitializeDotNetCli $restore
|
||||
|
||||
# return values
|
||||
_InitializeBuildTool="$_InitializeDotNetCli/dotnet"
|
||||
_InitializeBuildTool="$_InitializeDotNetCli/dotnet"
|
||||
_InitializeBuildToolCommand="msbuild"
|
||||
_InitializeBuildToolFramework="netcoreapp2.1"
|
||||
}
|
||||
@@ -319,7 +341,7 @@ function InitializeToolset {
|
||||
if [[ "$binary_log" == true ]]; then
|
||||
bl="/bl:$log_dir/ToolsetRestore.binlog"
|
||||
fi
|
||||
|
||||
|
||||
echo '<Project Sdk="Microsoft.DotNet.Arcade.Sdk"/>' > "$proj"
|
||||
MSBuild-Core "$proj" $bl /t:__WriteToolsetLocation /clp:ErrorsOnly\;NoSummary /p:__ToolsetLocationOutputFile="$toolset_location_file"
|
||||
|
||||
|
||||
Vendored
+1
-1
Submodule external/bockbuild updated: 5a05db67cb...23374e3b63.
Vendored
+1
-1
Submodule external/nunit-lite updated: 5406f2a7a0...26dbdb9a88.
+2
-2
@@ -3,7 +3,7 @@
|
||||
"dotnet": "5.0.100-alpha1-015772"
|
||||
},
|
||||
"msbuild-sdks": {
|
||||
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20076.3",
|
||||
"Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20076.3"
|
||||
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20109.1",
|
||||
"Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20109.1"
|
||||
}
|
||||
}
|
||||
@@ -97,6 +97,5 @@ AC_DEFUN([AC_MONO_OUTPUT], [
|
||||
tools/mono-hang-watchdog/Makefile
|
||||
runtime/Makefile
|
||||
po/Makefile
|
||||
netcore/corerun/Makefile
|
||||
])
|
||||
])
|
||||
@@ -612,8 +612,7 @@ namespace System {
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (FileNotFoundException) {
|
||||
}
|
||||
} catch {}
|
||||
|
||||
return Path.Combine (home_dir, fallback);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
App,mscorlib.dll,System.dll,System.Core.dll,System.Xml.dll,I18N.CJK.dll,I18N.MidEast.dll,I18N.Other.dll,I18N.Rare.dll,I18N.West.dll,I18N.dll,Microsoft.CSharp.dll,System.ComponentModel.Composition.dll,System.ComponentModel.DataAnnotations.dll,System.Data.DataSetExtensions.dll,System.Data.Services.Client.dll,System.Data.dll,System.IO.Compression.FileSystem.dll,System.IO.Compression.dll,System.IdentityModel.dll,System.Json.dll,System.Net.Http.WinHttpHandler.dll,System.Net.Http.dll,System.Net.dll,System.Numerics.Vectors.dll,System.Numerics.dll,System.Reflection.Context.dll,System.Runtime.CompilerServices.Unsafe.dll,System.Runtime.Serialization.dll,System.Security.dll,System.ServiceModel.Internals.dll,System.ServiceModel.Web.dll,System.ServiceModel.dll,System.Transactions.dll,System.Web.Services.dll,System.Windows.dll,System.Xml.Linq.dll,System.Xml.Serialization.dll
|
||||
Newtonsoft.Json.Test/bin/iPhoneSimulator/Release/Newtonsoft.Json.Test.exe,1817088,720384,369152,420864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35840,0,0,0,0,0,0,0,0,0,0,30720,0
|
||||
System.Core/test-plinq-01.exe,941056,13824,60928,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Net.Http/test-handler-01.exe,1390080,86016,8192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10240,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Net.Http/test-handler-01.exe,1389568,86016,8192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10240,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System/test-security.exe,1382912,64000,8192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System/test-typeconverter.exe,1033216,80384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-array.exe,874496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-01.exe,874496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-02.exe,874496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-crypto-01.exe,875008,0,4608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-crypto-01.exe,874496,0,4608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-exception-01.exe,874496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-locale-01.exe,878080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-methodimpl-01.exe,874496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|
||||
|
@@ -1,11 +1,11 @@
|
||||
App,mscorlib.dll,System.dll,System.Core.dll,System.Xml.dll,I18N.CJK.dll,I18N.MidEast.dll,I18N.Other.dll,I18N.Rare.dll,I18N.West.dll,I18N.dll,Microsoft.CSharp.dll,System.ComponentModel.Composition.dll,System.ComponentModel.DataAnnotations.dll,System.Data.DataSetExtensions.dll,System.Data.dll,System.IO.Compression.FileSystem.dll,System.IO.Compression.dll,System.Net.Http.dll,System.Numerics.Vectors.dll,System.Numerics.dll,System.Runtime.CompilerServices.Unsafe.dll,System.Runtime.Serialization.dll,System.Security.dll,System.ServiceModel.Internals.dll,System.Transactions.dll,System.Xml.Linq.dll
|
||||
BlazingPizza.Client/bin/Release/netstandard2.0/BlazingPizza.Client.dll,1121280,67072,286208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,3072,0,0,0,0,0
|
||||
HelloWorld/bin/Release/netstandard2.0/dist/_framework/_bin/HelloWorld.dll,1108480,67072,284672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,0,0,0,0,0,0
|
||||
Microsoft.AspNetCore.Blazor.E2EPerformance/bin/Release/netstandard2.0/Microsoft.AspNetCore.Blazor.E2EPerformance.dll,1154560,68608,286208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,0,0,0,0,0,0
|
||||
Newtonsoft/bin/Release/netstandard2.0/dist/_framework/_bin/Newtonsoft.dll,1108992,67072,284672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,0,0,0,0,0,0
|
||||
BlazingPizza.Client/bin/Release/netstandard2.0/BlazingPizza.Client.dll,1120256,67072,286208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,3072,0,0,0,0,0
|
||||
HelloWorld/bin/Release/netstandard2.0/dist/_framework/_bin/HelloWorld.dll,1107968,67072,284672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,0,0,0,0,0,0
|
||||
Microsoft.AspNetCore.Blazor.E2EPerformance/bin/Release/netstandard2.0/Microsoft.AspNetCore.Blazor.E2EPerformance.dll,1154048,68608,286208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,0,0,0,0,0,0
|
||||
Newtonsoft/bin/Release/netstandard2.0/dist/_framework/_bin/Newtonsoft.dll,1107968,67072,284672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,0,0,0,0,0,0
|
||||
System.Core/test-plinq-01.exe,535040,12288,60928,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Net.Http/test-handler-01.exe,713216,38400,7168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6656,0,0,0,0,0,0,0,0
|
||||
System/test-security.exe,1037824,60416,26624,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0
|
||||
System.Net.Http/test-handler-01.exe,712704,38400,7168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6656,0,0,0,0,0,0,0,0
|
||||
System/test-security.exe,1037312,60416,26624,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0
|
||||
System/test-typeconverter.exe,648192,78848,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-array.exe,451584,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-01.exe,451584,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
@@ -15,7 +15,7 @@ mscorlib/test-exception-01.exe,451584,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
mscorlib/test-locale-01.exe,459776,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-methodimpl-01.exe,451584,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-01.exe,451584,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-02.exe,487936,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-02.exe,463360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-03.exe,599040,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-04.exe,463360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-01.exe,451584,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|
||||
|
@@ -680,6 +680,9 @@ mono_runtime_install_appctx_properties (void);
|
||||
gboolean
|
||||
mono_domain_set_fast (MonoDomain *domain, gboolean force);
|
||||
|
||||
void
|
||||
mono_domain_ensure_entry_assembly (MonoDomain *domain, MonoAssembly *assembly);
|
||||
|
||||
MonoAssemblyLoadContext *
|
||||
mono_domain_default_alc (MonoDomain *domain);
|
||||
|
||||
|
||||
+33
-24
@@ -1023,7 +1023,32 @@ mono_domain_foreach (MonoDomainFunc func, gpointer user_data)
|
||||
MONO_EXIT_GC_UNSAFE;
|
||||
}
|
||||
|
||||
/* FIXME: maybe we should integrate this with mono_assembly_open? */
|
||||
void
|
||||
mono_domain_ensure_entry_assembly (MonoDomain *domain, MonoAssembly *assembly)
|
||||
{
|
||||
if (!domain->entry_assembly && assembly) {
|
||||
gchar *str;
|
||||
ERROR_DECL (error);
|
||||
|
||||
domain->entry_assembly = assembly;
|
||||
/* Domains created from another domain already have application_base and configuration_file set */
|
||||
if (domain->setup->application_base == NULL) {
|
||||
MonoString *basedir = mono_string_new_checked (domain, assembly->basedir, error);
|
||||
mono_error_assert_ok (error);
|
||||
MONO_OBJECT_SETREF_INTERNAL (domain->setup, application_base, basedir);
|
||||
}
|
||||
|
||||
if (domain->setup->configuration_file == NULL) {
|
||||
str = g_strconcat (assembly->image->name, ".config", (const char*)NULL);
|
||||
MonoString *config_file = mono_string_new_checked (domain, str, error);
|
||||
mono_error_assert_ok (error);
|
||||
MONO_OBJECT_SETREF_INTERNAL (domain->setup, configuration_file, config_file);
|
||||
g_free (str);
|
||||
mono_domain_set_options_from_config (domain);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* mono_domain_assembly_open:
|
||||
* \param domain the application domain
|
||||
@@ -1040,37 +1065,15 @@ mono_domain_assembly_open (MonoDomain *domain, const char *name)
|
||||
}
|
||||
|
||||
// Uses the domain on legacy mono and the ALC on current
|
||||
// Intended only for loading the main assembly
|
||||
MonoAssembly *
|
||||
mono_domain_assembly_open_internal (MonoDomain *domain, MonoAssemblyLoadContext *alc, const char *name)
|
||||
{
|
||||
MonoDomain *current;
|
||||
MonoAssembly *ass;
|
||||
GSList *tmp;
|
||||
|
||||
MONO_REQ_GC_UNSAFE_MODE;
|
||||
|
||||
#ifdef ENABLE_NETCORE
|
||||
mono_alc_assemblies_lock (alc);
|
||||
for (tmp = alc->loaded_assemblies; tmp; tmp = tmp->next) {
|
||||
ass = (MonoAssembly *)tmp->data;
|
||||
if (strcmp (name, ass->aname.name) == 0) {
|
||||
mono_alc_assemblies_unlock (alc);
|
||||
return ass;
|
||||
}
|
||||
}
|
||||
mono_alc_assemblies_unlock (alc);
|
||||
#else
|
||||
mono_domain_assemblies_lock (domain);
|
||||
for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) {
|
||||
ass = (MonoAssembly *)tmp->data;
|
||||
if (strcmp (name, ass->aname.name) == 0) {
|
||||
mono_domain_assemblies_unlock (domain);
|
||||
return ass;
|
||||
}
|
||||
}
|
||||
mono_domain_assemblies_unlock (domain);
|
||||
#endif
|
||||
|
||||
MonoAssemblyOpenRequest req;
|
||||
mono_assembly_request_prepare_open (&req, MONO_ASMCTX_DEFAULT, alc);
|
||||
if (domain != mono_domain_get ()) {
|
||||
@@ -1083,6 +1086,12 @@ mono_domain_assembly_open_internal (MonoDomain *domain, MonoAssemblyLoadContext
|
||||
ass = mono_assembly_request_open (name, &req, NULL);
|
||||
}
|
||||
|
||||
// On netcore, this is necessary because we check the AppContext.BaseDirectory property as part of the assembly lookup algorithm
|
||||
// AppContext.BaseDirectory can sometimes fall back to checking the location of the entry_assembly, which should be non-null
|
||||
#ifdef ENABLE_NETCORE
|
||||
mono_domain_ensure_entry_assembly (domain, ass);
|
||||
#endif
|
||||
|
||||
return ass;
|
||||
}
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
#include "icall-decl.h"
|
||||
#include "mono/utils/mono-threads-coop.h"
|
||||
#include "mono/metadata/icall-signatures.h"
|
||||
#include "mono/utils/mono-signal-handler.h"
|
||||
|
||||
//#define MONO_DEBUG_ICALLARRAY
|
||||
|
||||
@@ -6524,8 +6525,7 @@ ves_icall_Mono_Runtime_SendMicrosoftTelemetry (const char *payload, guint64 port
|
||||
hashes.offset_free_hash = portable_hash;
|
||||
hashes.offset_rich_hash = unportable_hash;
|
||||
|
||||
// Tells mono that we want to send the HANG EXC_TYPE.
|
||||
const char *signal = "SIGTERM";
|
||||
const char *signal = "MANAGED_EXCEPTION";
|
||||
|
||||
gboolean success = mono_merp_invoke (crashed_pid, signal, payload, &hashes);
|
||||
if (!success) {
|
||||
@@ -6823,7 +6823,7 @@ get_generic_inst_from_array_handle (MonoArrayHandle type_args)
|
||||
int size = MONO_SIZEOF_GENERIC_INST + type_argc * sizeof (MonoType *);
|
||||
|
||||
MonoGenericInst *ginst = (MonoGenericInst *)g_alloca (size);
|
||||
memset (ginst, 0, sizeof (MonoGenericInst));
|
||||
memset (ginst, 0, MONO_SIZEOF_GENERIC_INST);
|
||||
ginst->type_argc = type_argc;
|
||||
for (int i = 0; i < type_argc; i++) {
|
||||
MONO_HANDLE_ARRAY_GETVAL (ginst->type_argv[i], type_args, MonoType*, i);
|
||||
|
||||
@@ -3386,7 +3386,7 @@ mono_metadata_get_generic_inst (int type_argc, MonoType **type_argv)
|
||||
is_open = (i < type_argc);
|
||||
|
||||
ginst = (MonoGenericInst *)g_alloca (size);
|
||||
memset (ginst, 0, sizeof (MonoGenericInst));
|
||||
memset (ginst, 0, MONO_SIZEOF_GENERIC_INST);
|
||||
ginst->is_open = is_open;
|
||||
ginst->type_argc = type_argc;
|
||||
memcpy (ginst->type_argv, type_argv, type_argc * sizeof (MonoType *));
|
||||
|
||||
+2
-23
@@ -5118,29 +5118,8 @@ prepare_thread_to_exec_main (MonoDomain *domain, MonoMethod *method)
|
||||
MonoCustomAttrInfo* cinfo;
|
||||
gboolean has_stathread_attribute;
|
||||
|
||||
if (!domain->entry_assembly) {
|
||||
gchar *str;
|
||||
ERROR_DECL (error);
|
||||
MonoAssembly *assembly;
|
||||
|
||||
assembly = m_class_get_image (method->klass)->assembly;
|
||||
domain->entry_assembly = assembly;
|
||||
/* Domains created from another domain already have application_base and configuration_file set */
|
||||
if (domain->setup->application_base == NULL) {
|
||||
MonoString *basedir = mono_string_new_checked (domain, assembly->basedir, error);
|
||||
mono_error_assert_ok (error);
|
||||
MONO_OBJECT_SETREF_INTERNAL (domain->setup, application_base, basedir);
|
||||
}
|
||||
|
||||
if (domain->setup->configuration_file == NULL) {
|
||||
str = g_strconcat (assembly->image->name, ".config", (const char*)NULL);
|
||||
MonoString *config_file = mono_string_new_checked (domain, str, error);
|
||||
mono_error_assert_ok (error);
|
||||
MONO_OBJECT_SETREF_INTERNAL (domain->setup, configuration_file, config_file);
|
||||
g_free (str);
|
||||
mono_domain_set_options_from_config (domain);
|
||||
}
|
||||
}
|
||||
if (!domain->entry_assembly)
|
||||
mono_domain_ensure_entry_assembly (domain, m_class_get_image (method->klass)->assembly);
|
||||
|
||||
ERROR_DECL (cattr_error);
|
||||
cinfo = mono_custom_attrs_from_method_checked (method, cattr_error);
|
||||
|
||||
@@ -826,7 +826,7 @@ unaligned.exe: unaligned.cs TestDriver.dll MemoryIntrinsics.dll
|
||||
%.exe: %.cs TestDriver.dll
|
||||
$(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll
|
||||
|
||||
%.exe: %.il
|
||||
%.exe: %.il TestDriver.dll
|
||||
$(ILASM) -output=$@ $<
|
||||
|
||||
TestDriver.dll: $(srcdir)/TestDriver.cs $(srcdir)/TestHelpers.cs
|
||||
|
||||
@@ -200,6 +200,7 @@ static gboolean
|
||||
parse_debug_options (const char* p)
|
||||
{
|
||||
MonoDebugOptions *opt = mini_get_debug_options ();
|
||||
opt->enabled = TRUE;
|
||||
|
||||
do {
|
||||
if (!*p) {
|
||||
@@ -216,6 +217,11 @@ parse_debug_options (const char* p)
|
||||
} else if (!strncmp (p, "gdb", 3)) {
|
||||
opt->gdb = TRUE;
|
||||
p += 3;
|
||||
#ifdef ENABLE_NETCORE
|
||||
} else if (!strncmp (p, "ignore", 6)) {
|
||||
opt->enabled = FALSE;
|
||||
p += 6;
|
||||
#endif
|
||||
} else {
|
||||
fprintf (stderr, "Invalid debug option `%s', use --help-debug for details\n", p);
|
||||
return FALSE;
|
||||
@@ -1605,7 +1611,12 @@ mini_usage (void)
|
||||
"\n"
|
||||
"Development:\n"
|
||||
" --aot[=<options>] Compiles the assembly to native code\n"
|
||||
#ifdef ENABLE_NETCORE
|
||||
" --debug=ignore Disable debugging support (on by default)\n"
|
||||
" --debug=[<options>] Disable debugging support or enable debugging extras, use --help-debug for details\n"
|
||||
#else
|
||||
" --debug[=<options>] Enable debugging support, use --help-debug for details\n"
|
||||
#endif
|
||||
" --debugger-agent=options Enable the debugger agent\n"
|
||||
" --profile[=profiler] Runs in profiling mode with the specified profiler module\n"
|
||||
" --trace[=EXPR] Enable tracing, use --help-trace for details\n"
|
||||
@@ -1664,10 +1675,17 @@ mini_debug_usage (void)
|
||||
{
|
||||
fprintf (stdout,
|
||||
"Debugging options:\n"
|
||||
#ifdef ENABLE_NETCORE
|
||||
" --debug[=OPTIONS] Disable debugging support or enable debugging extras, optional OPTIONS is a comma\n"
|
||||
#else
|
||||
" --debug[=OPTIONS] Enable debugging support, optional OPTIONS is a comma\n"
|
||||
#endif
|
||||
" separated list of options\n"
|
||||
"\n"
|
||||
"OPTIONS is composed of:\n"
|
||||
#ifdef ENABLE_NETCORE
|
||||
" ignore Disable debugging support (on by default).\n"
|
||||
#endif
|
||||
" casts Enable more detailed InvalidCastException messages.\n"
|
||||
" mdb-optimizations Disable some JIT optimizations which are normally\n"
|
||||
" disabled when running inside the debugger.\n"
|
||||
@@ -2125,6 +2143,10 @@ mono_main (int argc, char* argv[])
|
||||
|
||||
opt = mono_parse_default_optimizations (NULL);
|
||||
|
||||
#ifdef ENABLE_NETCORE
|
||||
enable_debugging = TRUE;
|
||||
#endif
|
||||
|
||||
for (i = 1; i < argc; ++i) {
|
||||
if (argv [i] [0] != '-')
|
||||
break;
|
||||
@@ -2360,6 +2382,13 @@ mono_main (int argc, char* argv[])
|
||||
enable_debugging = TRUE;
|
||||
if (!parse_debug_options (argv [i] + 8))
|
||||
return 1;
|
||||
#ifdef ENABLE_NETCORE
|
||||
MonoDebugOptions *opt = mini_get_debug_options ();
|
||||
|
||||
if (!opt->enabled) {
|
||||
enable_debugging = FALSE;
|
||||
}
|
||||
#endif
|
||||
} else if (strncmp (argv [i], "--debugger-agent=", 17) == 0) {
|
||||
MonoDebugOptions *opt = mini_get_debug_options ();
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ static LONG CALLBACK seh_unhandled_exception_filter(EXCEPTION_POINTERS* ep)
|
||||
#endif
|
||||
|
||||
if (mono_dump_start ())
|
||||
mono_handle_native_crash ("SIGSEGV", NULL, NULL);
|
||||
mono_handle_native_crash (mono_get_signame (SIGSEGV), NULL, NULL);
|
||||
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
}
|
||||
@@ -876,7 +876,7 @@ altstack_handle_and_restore (MonoContext *ctx, MonoObject *obj, guint32 flags)
|
||||
|
||||
if (!ji || (!stack_ovf && !nullref)) {
|
||||
if (mono_dump_start ())
|
||||
mono_handle_native_crash ("SIGSEGV", ctx, NULL);
|
||||
mono_handle_native_crash (mono_get_signame (SIGSEGV), ctx, NULL);
|
||||
// if couldn't dump or if mono_handle_native_crash returns, abort
|
||||
abort ();
|
||||
}
|
||||
|
||||
@@ -676,7 +676,7 @@ mono_arch_handle_altstack_exception (void *sigctx, MONO_SIG_HANDLER_INFO_TYPE *s
|
||||
}
|
||||
if (!ji)
|
||||
if (mono_dump_start ())
|
||||
mono_handle_native_crash ("SIGSEGV", (MonoContext*)sigctx, siginfo);
|
||||
mono_handle_native_crash (mono_get_signame (SIGSEGV), (MonoContext*)sigctx, siginfo);
|
||||
/* setup a call frame on the real stack so that control is returned there
|
||||
* and exception handling can continue.
|
||||
* The frame looks like:
|
||||
|
||||
@@ -67,7 +67,7 @@ static LONG CALLBACK seh_unhandled_exception_filter(EXCEPTION_POINTERS* ep)
|
||||
}
|
||||
#endif
|
||||
if (mono_dump_start ())
|
||||
mono_handle_native_crash ("SIGSEGV", NULL, NULL);
|
||||
mono_handle_native_crash (mono_get_signame (SIGSEGV), NULL, NULL);
|
||||
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
}
|
||||
@@ -1140,7 +1140,7 @@ mono_arch_handle_altstack_exception (void *sigctx, MONO_SIG_HANDLER_INFO_TYPE *s
|
||||
MonoContext mctx;
|
||||
mono_sigctx_to_monoctx (sigctx, &mctx);
|
||||
if (mono_dump_start ())
|
||||
mono_handle_native_crash ("SIGSEGV", &mctx, siginfo);
|
||||
mono_handle_native_crash (mono_get_signame (SIGSEGV), &mctx, siginfo);
|
||||
else
|
||||
abort ();
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ struct _StackFragment {
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
StackFragment *first, *last, *current;
|
||||
StackFragment *first, *current;
|
||||
/* For GC sync */
|
||||
int inited;
|
||||
} FrameStack;
|
||||
@@ -200,6 +200,7 @@ typedef struct {
|
||||
const unsigned short *ip;
|
||||
GSList *finally_ips;
|
||||
FrameClauseArgs *clause_args;
|
||||
gboolean is_void : 1;
|
||||
} InterpState;
|
||||
|
||||
struct _InterpFrame {
|
||||
|
||||
+71
-56
@@ -121,7 +121,7 @@ frame_stack_init (FrameStack *stack, int size)
|
||||
StackFragment *frag;
|
||||
|
||||
frag = stack_frag_new (size);
|
||||
stack->first = stack->last = stack->current = frag;
|
||||
stack->first = stack->current = frag;
|
||||
mono_compiler_barrier ();
|
||||
stack->inited = 1;
|
||||
}
|
||||
@@ -137,12 +137,21 @@ add_frag (FrameStack *stack, int size)
|
||||
frag_size = size + sizeof (StackFragment);
|
||||
new_frag = stack_frag_new (frag_size);
|
||||
mono_compiler_barrier ();
|
||||
stack->last->next = new_frag;
|
||||
stack->last = new_frag;
|
||||
stack->current->next = new_frag;
|
||||
stack->current = new_frag;
|
||||
return new_frag;
|
||||
}
|
||||
|
||||
static void
|
||||
free_frag (StackFragment *frag)
|
||||
{
|
||||
while (frag) {
|
||||
StackFragment *next = frag->next;
|
||||
g_free (frag);
|
||||
frag = next;
|
||||
}
|
||||
}
|
||||
|
||||
static MONO_ALWAYS_INLINE gpointer
|
||||
frame_stack_alloc_ovf (FrameStack *stack, int size, StackFragment **out_frag)
|
||||
{
|
||||
@@ -153,6 +162,12 @@ frame_stack_alloc_ovf (FrameStack *stack, int size, StackFragment **out_frag)
|
||||
current = stack->current = current->next;
|
||||
current->pos = (guint8*)¤t->data;
|
||||
} else {
|
||||
StackFragment *tmp = current->next;
|
||||
/* avoid linking to be freed fragments, so the GC can't trip over it */
|
||||
current->next = NULL;
|
||||
mono_compiler_barrier ();
|
||||
free_frag (tmp);
|
||||
|
||||
current = add_frag (stack, size);
|
||||
}
|
||||
g_assert (current->pos + size <= current->end);
|
||||
@@ -201,12 +216,7 @@ frame_stack_free (FrameStack *stack)
|
||||
{
|
||||
stack->inited = 0;
|
||||
mono_compiler_barrier ();
|
||||
StackFragment *frag = stack->first;
|
||||
while (frag) {
|
||||
StackFragment *next = frag->next;
|
||||
g_free (frag);
|
||||
frag = next;
|
||||
}
|
||||
free_frag (stack->first);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -291,14 +301,6 @@ static gboolean interp_init_done = FALSE;
|
||||
|
||||
static void interp_exec_method_full (InterpFrame *frame, ThreadContext *context, FrameClauseArgs *clause_args, MonoError *error);
|
||||
|
||||
static MONO_NEVER_INLINE void
|
||||
interp_exec_method_call_vararg (InterpFrame *frame, ThreadContext *context, MonoError *error)
|
||||
// This function makes WebAsssembly stacks clearer, so you can see which recursion
|
||||
// is occuring, in the absence of line numbers in the debugger.
|
||||
{
|
||||
interp_exec_method_full (frame, context, NULL, error);
|
||||
}
|
||||
|
||||
static MONO_NEVER_INLINE void
|
||||
interp_exec_method_newobj_fast (InterpFrame *frame, ThreadContext *context, MonoError *error)
|
||||
// This function makes WebAsssembly stacks clearer, so you can see which recursion
|
||||
@@ -3245,6 +3247,8 @@ mono_interp_newobj_vt (
|
||||
memset (&valuetype_this, 0, sizeof (stackval));
|
||||
sp->data.p = &valuetype_this;
|
||||
|
||||
// FIXME remove recursion
|
||||
//
|
||||
// FIXME It is unfortunate to outline a recursive case as it
|
||||
// increases its stack usage. We do this however as it conserves
|
||||
// stack for all the other recursive cases.
|
||||
@@ -3480,6 +3484,7 @@ method_entry (ThreadContext *context, InterpFrame *frame, gboolean *out_tracing,
|
||||
frame->state.ip = ip; \
|
||||
frame->state.sp = sp; \
|
||||
frame->state.vt_sp = vt_sp; \
|
||||
frame->state.is_void = is_void; \
|
||||
frame->state.finally_ips = finally_ips; \
|
||||
frame->state.clause_args = clause_args; \
|
||||
} while (0)
|
||||
@@ -3488,9 +3493,10 @@ method_entry (ThreadContext *context, InterpFrame *frame, gboolean *out_tracing,
|
||||
#define LOAD_INTERP_STATE(frame) do { \
|
||||
ip = frame->state.ip; \
|
||||
sp = frame->state.sp; \
|
||||
is_void = frame->state.is_void; \
|
||||
vt_sp = frame->state.vt_sp; \
|
||||
finally_ips = frame->state.finally_ips; \
|
||||
clause_args = frame->state.clause_args; \
|
||||
clause_args = frame->state.clause_args; \
|
||||
locals = (unsigned char *)frame->stack + frame->imethod->stack_size + frame->imethod->vt_stack_size; \
|
||||
frame->state.ip = NULL; \
|
||||
} while (0)
|
||||
@@ -3513,6 +3519,10 @@ method_entry (ThreadContext *context, InterpFrame *frame, gboolean *out_tracing,
|
||||
static MONO_NEVER_INLINE void
|
||||
interp_exec_method_full (InterpFrame *frame, ThreadContext *context, FrameClauseArgs *clause_args, MonoError *error)
|
||||
{
|
||||
InterpMethod *cmethod;
|
||||
gboolean is_void;
|
||||
stackval *retval;
|
||||
|
||||
/* Interpreter main loop state (InterpState) */
|
||||
const guint16 *ip = NULL;
|
||||
stackval *sp;
|
||||
@@ -3765,6 +3775,7 @@ main_loop:
|
||||
MonoMethodSignature *csignature;
|
||||
InterpMethod *imethod;
|
||||
stackval *retval;
|
||||
// FIXME This assumes a grow-down stack.
|
||||
gpointer native_stack_addr = frame->native_stack_addr ? (gpointer)((guint8*)frame->native_stack_addr - 1) : (gpointer)&retval;
|
||||
|
||||
frame->ip = ip;
|
||||
@@ -3779,10 +3790,8 @@ main_loop:
|
||||
mono_interp_error_cleanup (error); /* FIXME: don't swallow the error */
|
||||
}
|
||||
|
||||
if (csignature->ret->type != MONO_TYPE_VOID)
|
||||
retval = sp;
|
||||
else
|
||||
retval = NULL;
|
||||
is_void = csignature->ret->type == MONO_TYPE_VOID;
|
||||
retval = is_void ? NULL : sp;
|
||||
|
||||
sp->data.p = vt_sp;
|
||||
/* decrement by the actual number of args */
|
||||
@@ -3802,11 +3811,12 @@ main_loop:
|
||||
/* Non-recursive call */
|
||||
SAVE_INTERP_STATE (frame);
|
||||
|
||||
child_frame = alloc_frame (context, native_stack_addr, frame, imethod, sp, retval);
|
||||
|
||||
if (G_UNLIKELY (!imethod->transformed)) {
|
||||
MonoException *ex;
|
||||
gboolean tracing;
|
||||
|
||||
child_frame = alloc_frame (context, native_stack_addr, frame, imethod, sp, retval);
|
||||
method_entry (context, child_frame, &tracing, &ex);
|
||||
if (G_UNLIKELY (ex)) {
|
||||
frame = child_frame;
|
||||
@@ -3815,7 +3825,6 @@ main_loop:
|
||||
EXCEPTION_CHECKPOINT;
|
||||
}
|
||||
} else {
|
||||
child_frame = alloc_frame (context, native_stack_addr, frame, imethod, sp, retval);
|
||||
alloc_stack_data (context, child_frame, imethod->alloca_size);
|
||||
#if DEBUG_INTERP
|
||||
debug_enter (child_frame, &tracing);
|
||||
@@ -3883,7 +3892,7 @@ main_loop:
|
||||
stackval *retval;
|
||||
MonoObject *this_arg;
|
||||
InterpMethod *imethod;
|
||||
gboolean is_void = *ip == MINT_VCALLVIRT_FAST;
|
||||
is_void = *ip == MINT_VCALLVIRT_FAST;
|
||||
int slot;
|
||||
|
||||
frame->ip = ip;
|
||||
@@ -3925,11 +3934,13 @@ main_loop:
|
||||
if (code_type == IMETHOD_CODE_INTERP) {
|
||||
SAVE_INTERP_STATE (frame);
|
||||
|
||||
// FIXME &retval looks wrong
|
||||
child_frame = alloc_frame (context, &retval, frame, imethod, sp, retval);
|
||||
|
||||
if (G_UNLIKELY (!imethod->transformed)) {
|
||||
MonoException *ex;
|
||||
gboolean tracing;
|
||||
|
||||
child_frame = alloc_frame (context, &retval, frame, imethod, sp, retval);
|
||||
method_entry (context, child_frame, &tracing, &ex);
|
||||
if (G_UNLIKELY (ex)) {
|
||||
frame = child_frame;
|
||||
@@ -3938,7 +3949,6 @@ main_loop:
|
||||
EXCEPTION_CHECKPOINT;
|
||||
}
|
||||
} else {
|
||||
child_frame = alloc_frame (context, &retval, frame, imethod, sp, retval);
|
||||
alloc_stack_data (context, child_frame, imethod->alloca_size);
|
||||
}
|
||||
|
||||
@@ -3962,48 +3972,43 @@ main_loop:
|
||||
MINT_IN_BREAK;
|
||||
}
|
||||
MINT_IN_CASE(MINT_CALL_VARARG) {
|
||||
stackval *retval;
|
||||
int num_varargs = 0;
|
||||
MonoMethodSignature *csig;
|
||||
|
||||
cmethod = (InterpMethod*)frame->imethod->data_items [ip [1]];
|
||||
|
||||
/* The real signature for vararg calls */
|
||||
csig = (MonoMethodSignature*) frame->imethod->data_items [ip [2]];
|
||||
|
||||
frame->ip = ip;
|
||||
|
||||
// Retval must be set unconditionally due to MINT_ARGLIST.
|
||||
// is_void further guides exit_frame.
|
||||
retval = sp;
|
||||
child_frame = alloc_frame (context, &retval, frame, (InterpMethod*)frame->imethod->data_items [ip [1]], NULL, retval);
|
||||
/* The real signature for vararg calls */
|
||||
csig = (MonoMethodSignature*) frame->imethod->data_items [ip [2]];
|
||||
is_void = csig->ret->type == MONO_TYPE_VOID;
|
||||
|
||||
/* Push all vararg arguments from normal sp to vt_sp together with the signature */
|
||||
num_varargs = csig->param_count - csig->sentinelpos;
|
||||
vt_sp = copy_varargs_vtstack (csig, sp, vt_sp);
|
||||
|
||||
ip += 3;
|
||||
sp->data.p = vt_sp;
|
||||
child_frame->retval = sp;
|
||||
|
||||
/* decrement by the actual number of args */
|
||||
sp -= child_frame->imethod->param_count + child_frame->imethod->hasthis + num_varargs;
|
||||
// FIXME This seems excessive: frame and csig param_count.
|
||||
sp -= cmethod->param_count + cmethod->hasthis + csig->param_count - csig->sentinelpos;
|
||||
|
||||
child_frame->stack_args = sp;
|
||||
interp_exec_method_call_vararg (child_frame, context, error);
|
||||
CHECK_RESUME_STATE (context);
|
||||
if (csig->ret->type != MONO_TYPE_VOID) {
|
||||
*sp = *retval;
|
||||
sp++;
|
||||
}
|
||||
MINT_IN_BREAK;
|
||||
goto call;
|
||||
}
|
||||
MINT_IN_CASE(MINT_VCALL)
|
||||
MINT_IN_CASE(MINT_CALL)
|
||||
MINT_IN_CASE(MINT_CALLVIRT)
|
||||
MINT_IN_CASE(MINT_VCALLVIRT) {
|
||||
// FIXME CALLVIRT opcodes are not used on netcore. We should kill them.
|
||||
stackval *retval;
|
||||
gboolean is_void = *ip == MINT_VCALL || *ip == MINT_VCALLVIRT;
|
||||
gboolean is_virtual = *ip == MINT_CALLVIRT || *ip == MINT_VCALLVIRT;
|
||||
gpointer native_stack_addr = frame->native_stack_addr ? (gpointer)((guint8*)frame->native_stack_addr - 1) : (gpointer)&retval;
|
||||
InterpMethod *imethod;
|
||||
// FIXME braces from here until call: label.
|
||||
is_void = *ip == MINT_VCALL || *ip == MINT_VCALLVIRT;
|
||||
gboolean is_virtual;
|
||||
is_virtual = *ip == MINT_CALLVIRT || *ip == MINT_VCALLVIRT;
|
||||
|
||||
imethod = (InterpMethod*)frame->imethod->data_items [ip [1]];
|
||||
cmethod = (InterpMethod*)frame->imethod->data_items [ip [1]];
|
||||
sp->data.p = vt_sp;
|
||||
retval = is_void ? NULL : sp;
|
||||
|
||||
@@ -4013,8 +4018,8 @@ main_loop:
|
||||
if (is_virtual) {
|
||||
MonoObject *this_arg = (MonoObject*)sp->data.p;
|
||||
|
||||
imethod = get_virtual_method (imethod, this_arg->vtable);
|
||||
if (m_class_is_valuetype (this_arg->vtable->klass) && m_class_is_valuetype (imethod->method->klass)) {
|
||||
cmethod = get_virtual_method (cmethod, this_arg->vtable);
|
||||
if (m_class_is_valuetype (this_arg->vtable->klass) && m_class_is_valuetype (cmethod->method->klass)) {
|
||||
/* unbox */
|
||||
gpointer unboxed = mono_object_unbox_internal (this_arg);
|
||||
sp [0].data.p = unboxed;
|
||||
@@ -4027,6 +4032,9 @@ main_loop:
|
||||
#else
|
||||
ip += 3;
|
||||
#endif
|
||||
call:;
|
||||
// FIXME This assumes a grow-down stack.
|
||||
gpointer native_stack_addr = frame->native_stack_addr ? (gpointer)((guint8*)frame->native_stack_addr - 1) : (gpointer)&retval;
|
||||
|
||||
/*
|
||||
* Make a non-recursive call by loading the new interpreter state based on child frame,
|
||||
@@ -4034,12 +4042,14 @@ main_loop:
|
||||
*/
|
||||
SAVE_INTERP_STATE (frame);
|
||||
|
||||
if (G_UNLIKELY (!imethod->transformed)) {
|
||||
child_frame = alloc_frame (context, native_stack_addr, frame, cmethod, sp, retval);
|
||||
|
||||
if (G_UNLIKELY (!cmethod->transformed)) {
|
||||
MonoException *ex;
|
||||
gboolean tracing;
|
||||
|
||||
child_frame = alloc_frame (context, native_stack_addr, frame, imethod, sp, retval);
|
||||
method_entry (context, child_frame, &tracing, &ex);
|
||||
|
||||
if (G_UNLIKELY (ex)) {
|
||||
frame = child_frame;
|
||||
frame->ip = NULL;
|
||||
@@ -4047,8 +4057,7 @@ main_loop:
|
||||
EXCEPTION_CHECKPOINT;
|
||||
}
|
||||
} else {
|
||||
child_frame = alloc_frame (context, native_stack_addr, frame, imethod, sp, retval);
|
||||
alloc_stack_data (context, child_frame, imethod->alloca_size);
|
||||
alloc_stack_data (context, child_frame, cmethod->alloca_size);
|
||||
#if DEBUG_INTERP
|
||||
debug_enter (child_frame, &tracing);
|
||||
#endif
|
||||
@@ -5144,7 +5153,10 @@ main_loop:
|
||||
frame->ip = ip;
|
||||
|
||||
child_frame = alloc_frame (context, &vtable, frame, ctor_method, sp, NULL);
|
||||
|
||||
// FIXME Remove recursion.
|
||||
interp_exec_method_newobj_fast (child_frame, context, error);
|
||||
|
||||
CHECK_RESUME_STATE (context);
|
||||
sp [0].data.o = o;
|
||||
sp++;
|
||||
@@ -5175,6 +5187,7 @@ main_loop:
|
||||
sp->data.p = vt_sp;
|
||||
ip += 4;
|
||||
|
||||
// FIXME remove recursion
|
||||
interp_exec_method_newobj_vtst_fast (child_frame, context, error);
|
||||
|
||||
CHECK_RESUME_STATE (context);
|
||||
@@ -5182,6 +5195,7 @@ main_loop:
|
||||
|
||||
} else {
|
||||
ip += 3;
|
||||
// FIXME remove recursion
|
||||
mono_interp_newobj_vt (child_frame, context, error);
|
||||
CHECK_RESUME_STATE (context);
|
||||
}
|
||||
@@ -5211,6 +5225,7 @@ main_loop:
|
||||
|
||||
child_frame->stack_args = sp;
|
||||
|
||||
// FIXME remove recursion
|
||||
MonoException* const exc = mono_interp_newobj (child_frame, context, error, vt_sp);
|
||||
if (exc)
|
||||
THROW_EX (exc, ip);
|
||||
@@ -7165,7 +7180,7 @@ exit_frame:
|
||||
|
||||
CHECK_RESUME_STATE (context);
|
||||
|
||||
if (retval) {
|
||||
if (retval && !is_void) {
|
||||
*sp = *retval;
|
||||
sp ++;
|
||||
}
|
||||
|
||||
@@ -2175,7 +2175,7 @@ direct_icalls_enabled (MonoCompile *cfg, MonoMethod *method)
|
||||
if (cfg->gen_sdb_seq_points || cfg->disable_direct_icalls)
|
||||
return FALSE;
|
||||
|
||||
if (method && mono_aot_direct_icalls_enabled_for_method (cfg, method))
|
||||
if (method && cfg->compile_aot && mono_aot_direct_icalls_enabled_for_method (cfg, method))
|
||||
return TRUE;
|
||||
|
||||
/* LLVM on amd64 can't handle calls to non-32 bit addresses */
|
||||
|
||||
@@ -645,6 +645,12 @@ primitive_type_to_llvm_type (MonoTypeEnum type)
|
||||
}
|
||||
}
|
||||
|
||||
static MonoTypeEnum
|
||||
inst_c1_type (const MonoInst *ins)
|
||||
{
|
||||
return (MonoTypeEnum)ins->inst_c1;
|
||||
}
|
||||
|
||||
/*
|
||||
* type_to_llvm_type:
|
||||
*
|
||||
@@ -7588,7 +7594,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
|
||||
}
|
||||
|
||||
case OP_SSE_LOADU: {
|
||||
LLVMValueRef dst_ptr = convert (ctx, lhs, LLVMPointerType (primitive_type_to_llvm_type (ins->inst_c1), 0));
|
||||
LLVMValueRef dst_ptr = convert (ctx, lhs, LLVMPointerType (primitive_type_to_llvm_type (inst_c1_type (ins)), 0));
|
||||
LLVMValueRef dst_vec = LLVMBuildBitCast (builder, dst_ptr, LLVMPointerType (type_to_simd_type (ins->inst_c1), 0), "");
|
||||
values [ins->dreg] = mono_llvm_build_aligned_load (builder, dst_vec, "", FALSE, ins->inst_c0); // inst_c0 is alignment
|
||||
break;
|
||||
@@ -7707,7 +7713,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
|
||||
case OP_CREATE_SCALAR_UNSAFE: {
|
||||
values [ins->dreg] = LLVMBuildInsertElement (builder,
|
||||
LLVMGetUndef (simd_class_to_llvm_type (ctx, ins->klass)),
|
||||
convert (ctx, lhs, primitive_type_to_llvm_type (ins->inst_c1)),
|
||||
convert (ctx, lhs, primitive_type_to_llvm_type (inst_c1_type (ins))),
|
||||
LLVMConstInt (LLVMInt32Type (), 0, FALSE), "");
|
||||
break;
|
||||
}
|
||||
@@ -7745,7 +7751,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
|
||||
// other overloads are implemented with `insertelement`
|
||||
values [ins->dreg] = LLVMBuildInsertElement (builder,
|
||||
values [ins->sreg1],
|
||||
convert (ctx, values [ins->sreg2], primitive_type_to_llvm_type (ins->inst_c1)),
|
||||
convert (ctx, values [ins->sreg2], primitive_type_to_llvm_type (inst_c1_type (ins))),
|
||||
convert (ctx, values [ins->sreg3], LLVMInt8Type ()), dname);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -231,7 +231,7 @@ MONO_SIG_HANDLER_FUNC (static, sigabrt_signal_handler)
|
||||
return;
|
||||
mono_sigctx_to_monoctx (ctx, &mctx);
|
||||
if (mono_dump_start ())
|
||||
mono_handle_native_crash ("SIGABRT", &mctx, info);
|
||||
mono_handle_native_crash (mono_get_signame (info->si_signo), &mctx, info);
|
||||
else
|
||||
abort ();
|
||||
}
|
||||
@@ -240,6 +240,7 @@ MONO_SIG_HANDLER_FUNC (static, sigabrt_signal_handler)
|
||||
MONO_SIG_HANDLER_FUNC (static, sigterm_signal_handler)
|
||||
{
|
||||
#ifndef DISABLE_CRASH_REPORTING
|
||||
MONO_SIG_HANDLER_INFO_TYPE *info = MONO_SIG_HANDLER_GET_INFO ();
|
||||
MONO_SIG_HANDLER_GET_CONTEXT;
|
||||
|
||||
// Note: this is only run from the non-controlling thread
|
||||
@@ -252,7 +253,7 @@ MONO_SIG_HANDLER_FUNC (static, sigterm_signal_handler)
|
||||
// running. Returns FALSE on unrecoverable error.
|
||||
if (mono_dump_start ()) {
|
||||
// Process was killed from outside since crash reporting wasn't running yet.
|
||||
mono_handle_native_crash ("SIGTERM", &mctx, NULL);
|
||||
mono_handle_native_crash (mono_get_signame (info->si_signo), &mctx, NULL);
|
||||
} else {
|
||||
// Crash reporting already running and we got a second SIGTERM from as part of thread-summarizing
|
||||
if (!mono_threads_summarize_execute (&mctx, &output, &hashes, FALSE, NULL, 0))
|
||||
@@ -437,6 +438,7 @@ mono_runtime_posix_install_handlers (void)
|
||||
|
||||
sigset_t signal_set;
|
||||
sigemptyset (&signal_set);
|
||||
mono_load_signames ();
|
||||
if (mini_debug_options.handle_sigint) {
|
||||
add_signal_handler (SIGINT, mono_sigint_signal_handler, SA_RESTART);
|
||||
sigaddset (&signal_set, SIGINT);
|
||||
@@ -446,7 +448,7 @@ mono_runtime_posix_install_handlers (void)
|
||||
sigaddset (&signal_set, SIGFPE);
|
||||
add_signal_handler (SIGQUIT, sigquit_signal_handler, SA_RESTART);
|
||||
sigaddset (&signal_set, SIGQUIT);
|
||||
add_signal_handler (SIGILL, mono_sigill_signal_handler, 0);
|
||||
add_signal_handler (SIGILL, mono_crashing_signal_handler, 0);
|
||||
sigaddset (&signal_set, SIGILL);
|
||||
add_signal_handler (SIGBUS, mono_sigsegv_signal_handler, 0);
|
||||
sigaddset (&signal_set, SIGBUS);
|
||||
@@ -454,6 +456,10 @@ mono_runtime_posix_install_handlers (void)
|
||||
add_signal_handler (SIGUSR2, sigusr2_signal_handler, SA_RESTART);
|
||||
sigaddset (&signal_set, SIGUSR2);
|
||||
}
|
||||
add_signal_handler (SIGTRAP, mono_crashing_signal_handler, 0);
|
||||
sigaddset (&signal_set, SIGTRAP);
|
||||
add_signal_handler (SIGSYS, mono_crashing_signal_handler, 0);
|
||||
sigaddset (&signal_set, SIGSYS);
|
||||
|
||||
/* it seems to have become a common bug for some programs that run as parents
|
||||
* of many processes to block signal delivery for real time signals.
|
||||
|
||||
@@ -3227,7 +3227,7 @@ MONO_SIG_HANDLER_FUNC (, mono_sigfpe_signal_handler)
|
||||
|
||||
mono_sigctx_to_monoctx (ctx, &mctx);
|
||||
if (mono_dump_start ())
|
||||
mono_handle_native_crash ("SIGFPE", &mctx, info);
|
||||
mono_handle_native_crash (mono_get_signame (SIGFPE), &mctx, info);
|
||||
if (mono_do_crash_chaining) {
|
||||
mono_chain_signal (MONO_SIG_HANDLER_PARAMS);
|
||||
goto exit;
|
||||
@@ -3240,7 +3240,7 @@ exit:
|
||||
MONO_EXIT_GC_UNSAFE_UNBALANCED;
|
||||
}
|
||||
|
||||
MONO_SIG_HANDLER_FUNC (, mono_sigill_signal_handler)
|
||||
MONO_SIG_HANDLER_FUNC (, mono_crashing_signal_handler)
|
||||
{
|
||||
MonoContext mctx;
|
||||
MONO_SIG_HANDLER_INFO_TYPE *info = MONO_SIG_HANDLER_GET_INFO ();
|
||||
@@ -3251,12 +3251,15 @@ MONO_SIG_HANDLER_FUNC (, mono_sigill_signal_handler)
|
||||
|
||||
mono_sigctx_to_monoctx (ctx, &mctx);
|
||||
if (mono_dump_start ())
|
||||
mono_handle_native_crash ("SIGILL", &mctx, info);
|
||||
#if defined(HAVE_SIG_INFO) && !defined(HOST_WIN32) // info is a siginfo_t
|
||||
mono_handle_native_crash (mono_get_signame (info->si_signo), &mctx, info);
|
||||
#else
|
||||
mono_handle_native_crash (mono_get_signame (SIGTERM), &mctx, info);
|
||||
#endif
|
||||
if (mono_do_crash_chaining) {
|
||||
mono_chain_signal (MONO_SIG_HANDLER_PARAMS);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if defined(MONO_ARCH_USE_SIGACTION) || defined(HOST_WIN32)
|
||||
@@ -3326,6 +3329,9 @@ MONO_SIG_HANDLER_FUNC (, mono_sigsegv_signal_handler)
|
||||
mono_aot_handle_pagefault (info->si_addr);
|
||||
return;
|
||||
}
|
||||
int signo = info->si_signo;
|
||||
#else
|
||||
int signo = SIGSEGV;
|
||||
#endif
|
||||
|
||||
/* The thread might no be registered with the runtime */
|
||||
@@ -3333,7 +3339,7 @@ MONO_SIG_HANDLER_FUNC (, mono_sigsegv_signal_handler)
|
||||
if (!mono_do_crash_chaining && mono_chain_signal (MONO_SIG_HANDLER_PARAMS))
|
||||
return;
|
||||
if (mono_dump_start())
|
||||
mono_handle_native_crash ("SIGSEGV", &mctx, info);
|
||||
mono_handle_native_crash (mono_get_signame (signo), &mctx, info);
|
||||
if (mono_do_crash_chaining) {
|
||||
mono_chain_signal (MONO_SIG_HANDLER_PARAMS);
|
||||
return;
|
||||
@@ -3376,7 +3382,7 @@ MONO_SIG_HANDLER_FUNC (, mono_sigsegv_signal_handler)
|
||||
} else {
|
||||
// FIXME: This shouldn't run on the altstack
|
||||
if (mono_dump_start ())
|
||||
mono_handle_native_crash ("SIGSEGV", &mctx, info);
|
||||
mono_handle_native_crash (mono_get_signame (SIGSEGV), &mctx, info);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -3387,7 +3393,7 @@ MONO_SIG_HANDLER_FUNC (, mono_sigsegv_signal_handler)
|
||||
return;
|
||||
|
||||
if (mono_dump_start ())
|
||||
mono_handle_native_crash ("SIGSEGV", &mctx, (MONO_SIG_HANDLER_INFO_TYPE*)info);
|
||||
mono_handle_native_crash (mono_get_signame (SIGSEGV), &mctx, (MONO_SIG_HANDLER_INFO_TYPE*)info);
|
||||
|
||||
if (mono_do_crash_chaining) {
|
||||
mono_chain_signal (MONO_SIG_HANDLER_PARAMS);
|
||||
@@ -3399,7 +3405,7 @@ MONO_SIG_HANDLER_FUNC (, mono_sigsegv_signal_handler)
|
||||
mono_arch_handle_exception (ctx, NULL);
|
||||
} else {
|
||||
if (mono_dump_start ())
|
||||
mono_handle_native_crash ("SIGSEGV", &mctx, (MONO_SIG_HANDLER_INFO_TYPE*)info);
|
||||
mono_handle_native_crash (mono_get_signame (SIGSEGV), &mctx, (MONO_SIG_HANDLER_INFO_TYPE*)info);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -262,6 +262,8 @@ typedef struct MonoDebugOptions {
|
||||
* embedding.
|
||||
*/
|
||||
gboolean top_runtime_invoke_unhandled;
|
||||
|
||||
gboolean enabled;
|
||||
} MonoDebugOptions;
|
||||
|
||||
/*
|
||||
@@ -571,7 +573,7 @@ mono_is_addr_implicit_null_check (void *addr);
|
||||
#endif
|
||||
|
||||
void MONO_SIG_HANDLER_SIGNATURE (mono_sigfpe_signal_handler) ;
|
||||
void MONO_SIG_HANDLER_SIGNATURE (mono_sigill_signal_handler) ;
|
||||
void MONO_SIG_HANDLER_SIGNATURE (mono_crashing_signal_handler) ;
|
||||
void MONO_SIG_HANDLER_SIGNATURE (mono_sigsegv_signal_handler);
|
||||
void MONO_SIG_HANDLER_SIGNATURE (mono_sigint_signal_handler) ;
|
||||
gboolean MONO_SIG_HANDLER_SIGNATURE (mono_chain_signal);
|
||||
|
||||
@@ -193,7 +193,7 @@ mono_runtime_install_handlers (void)
|
||||
#ifndef MONO_CROSS_COMPILE
|
||||
win32_seh_init();
|
||||
win32_seh_set_handler(SIGFPE, mono_sigfpe_signal_handler);
|
||||
win32_seh_set_handler(SIGILL, mono_sigill_signal_handler);
|
||||
win32_seh_set_handler(SIGILL, mono_crashing_signal_handler);
|
||||
win32_seh_set_handler(SIGSEGV, mono_sigsegv_signal_handler);
|
||||
if (mini_debug_options.handle_sigint)
|
||||
win32_seh_set_handler(SIGINT, mono_sigint_signal_handler);
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace WeakReferenceTest
|
||||
|
||||
Random rand = new Random(seed);
|
||||
|
||||
bool alive;
|
||||
volatile bool alive;
|
||||
Thread thread;
|
||||
|
||||
public void Start()
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
#include <setjmp.h>
|
||||
#include <signal.h>
|
||||
#include "../utils/mono-errno.h"
|
||||
#include "../utils/mono-compiler.h"
|
||||
|
||||
@@ -8011,6 +8012,64 @@ mono_test_MerpCrashUnhandledExceptionHook (void)
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
LIBTEST_API void STDCALL
|
||||
mono_test_MerpCrashSignalTerm (void)
|
||||
{
|
||||
raise (SIGTERM);
|
||||
}
|
||||
|
||||
// for the rest of the signal tests, we use SIGTERM as a fallback
|
||||
|
||||
LIBTEST_API void STDCALL
|
||||
mono_test_MerpCrashSignalAbrt (void)
|
||||
{
|
||||
#if defined (SIGABRT)
|
||||
raise (SIGABRT);
|
||||
#else
|
||||
raise (SIGTERM);
|
||||
#endif
|
||||
}
|
||||
|
||||
LIBTEST_API void STDCALL
|
||||
mono_test_MerpCrashSignalFpe (void)
|
||||
{
|
||||
#if defined (SIGFPE)
|
||||
raise (SIGFPE);
|
||||
#else
|
||||
raise (SIGTERM);
|
||||
#endif
|
||||
}
|
||||
|
||||
LIBTEST_API void STDCALL
|
||||
mono_test_MerpCrashSignalBus (void)
|
||||
{
|
||||
#if defined (SIGBUS)
|
||||
raise (SIGBUS);
|
||||
#else
|
||||
raise (SIGTERM);
|
||||
#endif
|
||||
}
|
||||
|
||||
LIBTEST_API void STDCALL
|
||||
mono_test_MerpCrashSignalSegv (void)
|
||||
{
|
||||
#if defined (SIGSEGV)
|
||||
raise (SIGSEGV);
|
||||
#else
|
||||
raise (SIGTERM);
|
||||
#endif
|
||||
}
|
||||
|
||||
LIBTEST_API void STDCALL
|
||||
mono_test_MerpCrashSignalIll (void)
|
||||
{
|
||||
#if defined (SIGILL)
|
||||
raise (SIGILL);
|
||||
#else
|
||||
raise (SIGTERM);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern C
|
||||
#endif
|
||||
@@ -38,6 +38,12 @@ class C
|
||||
Crashers.Add(new Tuple<String, Action> ("MerpCrashSnprintf", MerpCrashSnprintf));
|
||||
Crashers.Add(new Tuple<String, Action> ("MerpCrashDomainUnload", MerpCrashDomainUnload));
|
||||
Crashers.Add(new Tuple<String, Action> ("MerpCrashUnbalancedGCSafe", MerpCrashUnbalancedGCSafe));
|
||||
Crashers.Add(new Tuple<String,Action> ("MerpCrashSignalTerm", MerpCrashSignalTerm));
|
||||
Crashers.Add(new Tuple<String,Action> ("MerpCrashSignalTerm", MerpCrashSignalAbrt));
|
||||
Crashers.Add(new Tuple<String,Action> ("MerpCrashSignalKill", MerpCrashSignalFpe));
|
||||
Crashers.Add(new Tuple<String,Action> ("MerpCrashSignalKill", MerpCrashSignalBus));
|
||||
Crashers.Add(new Tuple<String,Action> ("MerpCrashSignalSegv", MerpCrashSignalSegv));
|
||||
Crashers.Add(new Tuple<String,Action> ("MerpCrashSignalIll", MerpCrashSignalIll));
|
||||
}
|
||||
|
||||
public static void
|
||||
@@ -113,6 +119,60 @@ class C
|
||||
[DllImport("libtest")]
|
||||
public static extern void mono_test_MerpCrashUnhandledExceptionHook ();
|
||||
|
||||
[DllImport("libtest")]
|
||||
public static extern void mono_test_MerpCrashSignalTerm ();
|
||||
|
||||
public static void
|
||||
MerpCrashSignalTerm ()
|
||||
{
|
||||
mono_test_MerpCrashSignalTerm ();
|
||||
}
|
||||
|
||||
[DllImport("libtest")]
|
||||
public static extern void mono_test_MerpCrashSignalAbrt ();
|
||||
|
||||
public static void
|
||||
MerpCrashSignalAbrt ()
|
||||
{
|
||||
mono_test_MerpCrashSignalAbrt ();
|
||||
}
|
||||
|
||||
[DllImport("libtest")]
|
||||
public static extern void mono_test_MerpCrashSignalFpe ();
|
||||
|
||||
public static void
|
||||
MerpCrashSignalFpe ()
|
||||
{
|
||||
mono_test_MerpCrashSignalFpe ();
|
||||
}
|
||||
|
||||
[DllImport("libtest")]
|
||||
public static extern void mono_test_MerpCrashSignalBus ();
|
||||
|
||||
public static void
|
||||
MerpCrashSignalBus ()
|
||||
{
|
||||
mono_test_MerpCrashSignalBus ();
|
||||
}
|
||||
|
||||
[DllImport("libtest")]
|
||||
public static extern void mono_test_MerpCrashSignalSegv ();
|
||||
|
||||
public static void
|
||||
MerpCrashSignalSegv ()
|
||||
{
|
||||
mono_test_MerpCrashSignalSegv ();
|
||||
}
|
||||
|
||||
[DllImport("libtest")]
|
||||
public static extern void mono_test_MerpCrashSignalIll ();
|
||||
|
||||
public static void
|
||||
MerpCrashSignalIll ()
|
||||
{
|
||||
mono_test_MerpCrashSignalIll ();
|
||||
}
|
||||
|
||||
public static void
|
||||
MerpCrashUnhandledExceptionHook ()
|
||||
{
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
*.pyc
|
||||
@@ -1,5 +1,4 @@
|
||||
This is a tool to generate offsets file for use by the mono cross compilers.
|
||||
|
||||
It depends on python and libclang. The 'clang' directory contains the python bindings to libclang, they are taken from:
|
||||
https://github.com/llvm/llvm-project/commits/master/clang/bindings/python/clang
|
||||
rev 8a12e40185cd0ce7031e6abab4af12e6fc923110
|
||||
https://github.com/llvm/llvm-project/tree/8a12e40185cd0ce7031e6abab4af12e6fc923110/clang/bindings/python/clang
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -9,6 +9,7 @@ import clang.cindex
|
||||
|
||||
IOS_DEFINES = ["HOST_DARWIN", "TARGET_MACH", "MONO_CROSS_COMPILE", "USE_MONO_CTX", "_XOPEN_SOURCE"]
|
||||
ANDROID_DEFINES = ["HOST_ANDROID", "MONO_CROSS_COMPILE", "USE_MONO_CTX", "BIONIC_IOCTL_NO_SIGNEDNESS_OVERLOAD"]
|
||||
LINUX_DEFINES = ["HOST_LINUX", "MONO_CROSS_COMPILE", "USE_MONO_CTX"]
|
||||
|
||||
class Target:
|
||||
def __init__(self, arch, platform, others):
|
||||
@@ -61,6 +62,8 @@ class OffsetsTool:
|
||||
parser.add_argument ('--targetdir', dest='target_path', help='path to mono tree configured for target', required=True)
|
||||
parser.add_argument ('--abi=', dest='abi', help='ABI triple to generate', required=True)
|
||||
parser.add_argument ('--sysroot=', dest='sysroot', help='path to sysroot headers of target')
|
||||
parser.add_argument ('--include-prefix=', dest='include_prefix', help='prefix path to include directory of target')
|
||||
parser.add_argument ('--netcore', dest='netcore', help='target runs with netcore', action='store_true')
|
||||
args = parser.parse_args ()
|
||||
|
||||
if not args.libclang or not os.path.isfile (args.libclang):
|
||||
@@ -84,6 +87,33 @@ class OffsetsTool:
|
||||
self.target = Target ("TARGET_WASM", None, [])
|
||||
self.target_args += ["-target", args.abi]
|
||||
|
||||
# Linux
|
||||
elif "arm-linux-gnueabihf" == args.abi:
|
||||
self.target = Target ("TARGET_ARM", None, ["ARM_FPU_VFP", "HAVE_ARMV5", "HAVE_ARMV6", "HAVE_ARMV7"] + LINUX_DEFINES)
|
||||
self.target_args += ["--target=arm---gnueabihf"]
|
||||
self.target_args += ["-I", args.sysroot + "/include"]
|
||||
|
||||
if args.include_prefix:
|
||||
if not os.path.isdir (args.include_prefix):
|
||||
print ("provided path via --include-prefix (\"" + args.include_prefix + "\") doesn't exist.", file=sys.stderr)
|
||||
sys.exit (1)
|
||||
self.target_args += ["-I", args.include_prefix + "/include"]
|
||||
self.target_args += ["-I", args.include_prefix + "/include-fixed"]
|
||||
else:
|
||||
found = False
|
||||
for i in range (11, 5, -1):
|
||||
prefix = "/usr/lib/gcc-cross/" + args.abi + "/" + str (i)
|
||||
if not os.path.isdir (prefix):
|
||||
continue
|
||||
found = True
|
||||
self.target_args += ["-I", prefix + "/include"]
|
||||
self.target_args += ["-I", prefix + "/include-fixed"]
|
||||
break
|
||||
|
||||
if not found:
|
||||
print ("could not find a valid include path for target, provide one via --include-prefix=<path>.", file=sys.stderr)
|
||||
sys.exit (1)
|
||||
|
||||
# iOS
|
||||
elif "arm-apple-darwin10" == args.abi:
|
||||
require_sysroot (args)
|
||||
@@ -138,6 +168,9 @@ class OffsetsTool:
|
||||
print ("ABI '" + args.abi + "' is not supported.", file=sys.stderr)
|
||||
sys.exit (1)
|
||||
|
||||
if args.netcore:
|
||||
self.target_args += ["-DENABLE_NETCORE"]
|
||||
|
||||
self.args = args
|
||||
|
||||
#
|
||||
@@ -206,6 +206,7 @@ monoutils_sources = \
|
||||
bsearch.h \
|
||||
bsearch.c \
|
||||
mono-signal-handler.h \
|
||||
mono-signal-handler.c \
|
||||
mono-conc-hashtable.h \
|
||||
mono-conc-hashtable.c \
|
||||
json.h \
|
||||
|
||||
+19
-6
@@ -40,6 +40,7 @@
|
||||
#include <mono/utils/json.h>
|
||||
#include <mono/utils/mono-state.h>
|
||||
#include <utils/mono-threads-debug.h>
|
||||
#include <utils/mono-signal-handler.h>
|
||||
|
||||
static const char *
|
||||
kernel_version_string (void)
|
||||
@@ -144,7 +145,8 @@ typedef enum
|
||||
MERP_EXC_SIGFPE = 7 ,
|
||||
MERP_EXC_SIGTRAP = 8,
|
||||
MERP_EXC_SIGKILL = 9,
|
||||
MERP_EXC_HANG = 10
|
||||
MERP_EXC_HANG = 10,
|
||||
MERP_EXC_MANAGED_EXCEPTION = 11
|
||||
} MERPExcType;
|
||||
|
||||
typedef struct {
|
||||
@@ -261,6 +263,8 @@ get_merp_exctype (MERPExcType exc)
|
||||
return "0x04000000";
|
||||
case MERP_EXC_HANG:
|
||||
return "0x02000000";
|
||||
case MERP_EXC_MANAGED_EXCEPTION:
|
||||
return "0x05000000";
|
||||
case MERP_EXC_NONE:
|
||||
// Exception type documented as optional, not optional
|
||||
g_assert_not_reached ();
|
||||
@@ -272,23 +276,32 @@ get_merp_exctype (MERPExcType exc)
|
||||
static MERPExcType
|
||||
parse_exception_type (const char *signal)
|
||||
{
|
||||
if (!strcmp (signal, "SIGSEGV"))
|
||||
if (!strcmp (signal, mono_get_signame (SIGSEGV)))
|
||||
return MERP_EXC_SIGSEGV;
|
||||
|
||||
if (!strcmp (signal, "SIGFPE"))
|
||||
if (!strcmp (signal, mono_get_signame (SIGFPE)))
|
||||
return MERP_EXC_SIGFPE;
|
||||
|
||||
if (!strcmp (signal, "SIGILL"))
|
||||
if (!strcmp (signal, mono_get_signame (SIGILL)))
|
||||
return MERP_EXC_SIGILL;
|
||||
|
||||
if (!strcmp (signal, "SIGABRT"))
|
||||
if (!strcmp (signal, mono_get_signame (SIGABRT)))
|
||||
return MERP_EXC_SIGABRT;
|
||||
|
||||
if (!strcmp (signal, mono_get_signame (SIGTRAP)))
|
||||
return MERP_EXC_SIGTRAP;
|
||||
|
||||
if (!strcmp (signal, mono_get_signame (SIGSYS)))
|
||||
return MERP_EXC_SIGSYS;
|
||||
|
||||
// Force quit == hang?
|
||||
// We need a default for this
|
||||
if (!strcmp (signal, "SIGTERM"))
|
||||
if (!strcmp (signal, mono_get_signame (SIGTERM)))
|
||||
return MERP_EXC_HANG;
|
||||
|
||||
if (!strcmp (signal, "MANAGED_EXCEPTION"))
|
||||
return MERP_EXC_MANAGED_EXCEPTION;
|
||||
|
||||
// FIXME: There are no other such signal
|
||||
// strings passed to mono_handle_native_crash at the
|
||||
// time of writing this
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
#include "config.h"
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include "mono/utils/mono-signal-handler.h"
|
||||
|
||||
struct mono_sigpair
|
||||
{
|
||||
int signo;
|
||||
const char* signame;
|
||||
};
|
||||
|
||||
#if !defined (HAVE_SYSSIGNAME)
|
||||
static struct mono_sigpair mono_signames[] =
|
||||
{
|
||||
{SIGABRT, "SIGABRT"},
|
||||
#if defined (SIGKILL)
|
||||
{SIGKILL, "SIGKILL"},
|
||||
#endif
|
||||
#if defined (SIGTRAP)
|
||||
{SIGTRAP, "SIGTRAP"},
|
||||
#endif
|
||||
#if defined (SIGSYS)
|
||||
{SIGSYS, "SIGSYS"},
|
||||
#endif
|
||||
{SIGSEGV, "SIGSEGV"},
|
||||
#if defined (SIGQUIT)
|
||||
{SIGQUIT, "SIGQUIT"},
|
||||
#endif
|
||||
{SIGFPE, "SIGFPE"},
|
||||
{SIGILL, "SIGILL"},
|
||||
#if defined (SIGBUS)
|
||||
{SIGBUS, "SIGBUS"} // How come this is seems not available on Android, but is used unconditionally in mini-posix.c:mono_runtime_posix_install_handlers ?
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct mono_sigpair *sigpair_buf;
|
||||
static int sigpair_buflen;
|
||||
|
||||
void
|
||||
mono_load_signames ()
|
||||
{
|
||||
if (sigpair_buf)
|
||||
return;
|
||||
#if defined (HAVE_SYSSIGNAME)
|
||||
sigpair_buflen = sizeof (sys_signame) / sizeof (sys_signame [0]);
|
||||
sigpair_buf = (struct mono_sigpair *) g_malloc (sigpair_buflen * sizeof (struct mono_sigpair));
|
||||
struct mono_sigpair *cur = sigpair_buf;
|
||||
for (int i = 0; i < sigpair_buflen; ++i)
|
||||
{
|
||||
cur->signo = i;
|
||||
cur->signame = sys_signame [i];
|
||||
cur++;
|
||||
}
|
||||
|
||||
#else
|
||||
sigpair_buflen = sizeof (mono_signames) / sizeof (mono_signames [0]);
|
||||
sigpair_buf = mono_signames;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
const char *
|
||||
mono_get_signame (int signo)
|
||||
{
|
||||
const char *result = "UNKNOWN";
|
||||
struct mono_sigpair *cur = sigpair_buf;
|
||||
for (int i = 0; i < sigpair_buflen; ++i)
|
||||
{
|
||||
if (cur->signo == signo)
|
||||
{
|
||||
result = cur->signame;
|
||||
break;
|
||||
}
|
||||
cur++;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -10,6 +10,7 @@
|
||||
#define __MONO_SIGNAL_HANDLER_H__
|
||||
|
||||
#include "config.h"
|
||||
#include <glib.h>
|
||||
|
||||
/*
|
||||
* When a signal is delivered to a thread on a Krait Android device
|
||||
@@ -78,6 +79,7 @@
|
||||
*/
|
||||
|
||||
#ifdef HOST_WIN32
|
||||
#include <windows.h>
|
||||
#define MONO_SIG_HANDLER_INFO_TYPE MonoWindowsSigHandlerInfo
|
||||
typedef struct {
|
||||
/* Set to FALSE to indicate chained signal handler needs run.
|
||||
@@ -99,4 +101,7 @@ typedef struct {
|
||||
#define MONO_SIG_HANDLER_GET_INFO() (_info)
|
||||
#define MONO_SIG_HANDLER_GET_CONTEXT void *ctx = context;
|
||||
|
||||
void mono_load_signames (void);
|
||||
const char * mono_get_signame (int signo);
|
||||
|
||||
#endif // __MONO_SIGNAL_HANDLER_H__
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <mono/metadata/threads-types.h>
|
||||
#include <mono/utils/json.h>
|
||||
|
||||
#define MONO_NATIVE_STATE_PROTOCOL_VERSION "0.0.5"
|
||||
#define MONO_NATIVE_STATE_PROTOCOL_VERSION "0.0.6"
|
||||
|
||||
typedef enum {
|
||||
MonoSummaryNone = 0,
|
||||
|
||||
+53
-23
@@ -1,4 +1,7 @@
|
||||
@ECHO off
|
||||
@ECHO OFF
|
||||
|
||||
SETLOCAL
|
||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
SET SOURCE_ROOT=%1
|
||||
SET TARGET_ROOT=%2
|
||||
@@ -50,6 +53,43 @@ IF "-q" == "%ARGUMENTS%" (
|
||||
SET "OPTIONS=/q /y"
|
||||
)
|
||||
|
||||
SET META_DATA_FILES=^
|
||||
appdomain.h ^
|
||||
assembly.h ^
|
||||
attrdefs.h ^
|
||||
blob.h ^
|
||||
class.h ^
|
||||
debug-helpers.h ^
|
||||
debug-mono-symfile.h ^
|
||||
environment.h ^
|
||||
exception.h ^
|
||||
image.h ^
|
||||
loader.h ^
|
||||
metadata.h ^
|
||||
mono-config.h ^
|
||||
mono-debug.h ^
|
||||
mono-gc.h ^
|
||||
object.h ^
|
||||
object-forward.h ^
|
||||
opcodes.h ^
|
||||
profiler.h ^
|
||||
profiler-events.h ^
|
||||
reflection.h ^
|
||||
row-indexes.h ^
|
||||
sgen-bridge.h ^
|
||||
threads.h ^
|
||||
tokentype.h ^
|
||||
verify.h
|
||||
|
||||
SET UTILS_FILES=^
|
||||
mono-counters.h ^
|
||||
mono-dl-fallback.h ^
|
||||
mono-error.h ^
|
||||
mono-forward.h ^
|
||||
mono-jemalloc.h ^
|
||||
mono-logger.h ^
|
||||
mono-publib.h
|
||||
|
||||
ECHO Copying mono include files from %SOURCE_ROOT% to %TARGET_ROOT% ...
|
||||
|
||||
SET RUN=%XCOPY_COMMAND% "%SOURCE_ROOT%\cil\opcode.def" "%TARGET_ROOT%\cil\" %OPTIONS%
|
||||
@@ -58,26 +98,15 @@ call :runCommand "%RUN%" %ARGUMENTS%
|
||||
SET RUN=%XCOPY_COMMAND% "%SOURCE_ROOT%\mini\jit.h" "%TARGET_ROOT%\jit\" %OPTIONS%
|
||||
call :runCommand "%RUN%" %ARGUMENTS%
|
||||
|
||||
SET RUN=%XCOPY_COMMAND% "%SOURCE_ROOT%\metadata\*.h" "%TARGET_ROOT%\metadata\" %OPTIONS%
|
||||
call :runCommand "%RUN%" %ARGUMENTS%
|
||||
FOR %%a IN (%META_DATA_FILES%) DO (
|
||||
SET RUN=%XCOPY_COMMAND% "%SOURCE_ROOT%\metadata\%%a" "%TARGET_ROOT%\metadata\" %OPTIONS%
|
||||
call :runCommand "!RUN!" %ARGUMENTS%
|
||||
)
|
||||
|
||||
SET RUN=%XCOPY_COMMAND% "%SOURCE_ROOT%\utils\mono-counters.h" "%TARGET_ROOT%\utils\" %OPTIONS%
|
||||
call :runCommand "%RUN%" %ARGUMENTS%
|
||||
|
||||
SET RUN=%XCOPY_COMMAND% "%SOURCE_ROOT%\utils\mono-dl-fallback.h" "%TARGET_ROOT%\utils\" %OPTIONS%
|
||||
call :runCommand "%RUN%" %ARGUMENTS%
|
||||
|
||||
SET RUN=%XCOPY_COMMAND% "%SOURCE_ROOT%\utils\mono-error.h" "%TARGET_ROOT%\utils\" %OPTIONS%
|
||||
call :runCommand "%RUN%" %ARGUMENTS%
|
||||
|
||||
SET RUN=%XCOPY_COMMAND% "%SOURCE_ROOT%\utils\mono-forward.h" "%TARGET_ROOT%\utils\" %OPTIONS%
|
||||
call :runCommand "%RUN%" %ARGUMENTS%
|
||||
|
||||
SET RUN=%XCOPY_COMMAND% "%SOURCE_ROOT%\utils\mono-logger.h" "%TARGET_ROOT%\utils\" %OPTIONS%
|
||||
call :runCommand "%RUN%" %ARGUMENTS%
|
||||
|
||||
SET RUN=%XCOPY_COMMAND% "%SOURCE_ROOT%\utils\mono-publib.h" "%TARGET_ROOT%\utils\" %OPTIONS%
|
||||
call :runCommand "%RUN%" %ARGUMENTS%
|
||||
FOR %%a IN (%UTILS_FILES%) DO (
|
||||
SET RUN=%XCOPY_COMMAND% "%SOURCE_ROOT%\utils\%%a" "%TARGET_ROOT%\utils\" %OPTIONS%
|
||||
call :runCommand "!RUN!" %ARGUMENTS%
|
||||
)
|
||||
|
||||
ECHO Copying mono include files from %SOURCE_ROOT% to %TARGET_ROOT% DONE.
|
||||
|
||||
@@ -87,8 +116,6 @@ EXIT /b 0
|
||||
ECHO "libmono.bat [SOURCE_ROOT] [TARGET_ROOT] [ARGUMENTS]"
|
||||
EXIT /b 1
|
||||
|
||||
@ECHO on
|
||||
|
||||
:runCommand
|
||||
|
||||
IF "-q" == "%~2" (
|
||||
@@ -97,4 +124,7 @@ EXIT /b 0
|
||||
%~1
|
||||
)
|
||||
|
||||
goto :EOF
|
||||
GOTO :EOF
|
||||
|
||||
|
||||
@ECHO ON
|
||||
@@ -174,6 +174,7 @@
|
||||
<ClInclude Include="$(MonoSourceLocation)\mono\utils\bsearch.h" />
|
||||
<ClCompile Include="$(MonoSourceLocation)\mono\utils\bsearch.c" />
|
||||
<ClInclude Include="$(MonoSourceLocation)\mono\utils\mono-signal-handler.h" />
|
||||
<ClCompile Include="$(MonoSourceLocation)\mono\utils\mono-signal-handler.c" />
|
||||
<ClInclude Include="$(MonoSourceLocation)\mono\utils\mono-conc-hashtable.h" />
|
||||
<ClCompile Include="$(MonoSourceLocation)\mono\utils\mono-conc-hashtable.c" />
|
||||
<ClInclude Include="$(MonoSourceLocation)\mono\utils\json.h" />
|
||||
|
||||
@@ -403,6 +403,9 @@
|
||||
<ClInclude Include="$(MonoSourceLocation)\mono\utils\mono-signal-handler.h">
|
||||
<Filter>Header Files$(MonoUtilsFilterSubFolder)\common</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="$(MonoSourceLocation)\mono\utils\mono-signal-handler.c">
|
||||
<Filter>Source Files$(MonoUtilsFilterSubFolder)\common</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="$(MonoSourceLocation)\mono\utils\mono-conc-hashtable.h">
|
||||
<Filter>Header Files$(MonoUtilsFilterSubFolder)\common</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -60,16 +60,24 @@ if [ -d ${FW_CURRENT} ]; then
|
||||
cd ${FW_CURRENT}/etc
|
||||
# Make sure we run the files we lay down, and not other stuff installed on the system
|
||||
export PATH="${FW_CURRENT}/bin:$PATH"
|
||||
LOG_DIR=/Library/Logs/Mono.framework
|
||||
mkdir ${LOG_DIR}
|
||||
|
||||
echo ======= `date` ===== >> "${LOG_DIR}/postinstall-gdk-pixbuf-query-loaders.log"
|
||||
echo ======= `date` ===== >> "${LOG_DIR}/postinstall-pango-querymodules.log"
|
||||
echo ======= `date` ===== >> "${LOG_DIR}/postinstall-fc-cache.log"
|
||||
echo ======= `date` ===== >> "${LOG_DIR}/gtk-query-immodules-2.0.log"
|
||||
|
||||
# gtk+ setup
|
||||
gdk-pixbuf-query-loaders --update-cache > "${FW_CURRENT}/postinstall-gdk-pixbuf-query-loaders.log" 2>&1 || true
|
||||
gdk-pixbuf-query-loaders --update-cache >> "${LOG_DIR}/postinstall-gdk-pixbuf-query-loaders.log" 2>&1 || true
|
||||
# pango setup
|
||||
mkdir -p pango
|
||||
pango-querymodules > pango/pango.modules 2> "${FW_CURRENT}/postinstall-pango-querymodules.log" || true
|
||||
pango-querymodules --update-cache >> "${FW_CURRENT}/postinstall-pango-querymodules.log" 2>&1 || true
|
||||
fc-cache > "${FW_CURRENT}/postinstall-fc-cache.log" 2>&1 || true
|
||||
pango-querymodules > pango/pango.modules 2>> "${LOG_DIR}/postinstall-pango-querymodules.log" || true
|
||||
pango-querymodules --update-cache >> "${LOG_DIR}/postinstall-pango-querymodules.log" 2>&1 || true
|
||||
fc-cache -v >> "${LOG_DIR}/postinstall-fc-cache.log" 2>&1 || true
|
||||
|
||||
cd ${FW_CURRENT}/lib/gtk-2.0/2.10.0
|
||||
gtk-query-immodules-2.0 > immodules.cache 2> "${FW_CURRENT}/gtk-query-immodules-2.0.log" || true
|
||||
gtk-query-immodules-2.0 > immodules.cache 2>> "${LOG_DIR}/gtk-query-immodules-2.0.log" || true
|
||||
fi
|
||||
|
||||
# Delete older Monos
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
class XspPackage (GitHubTarballPackage):
|
||||
|
||||
def __init__(self):
|
||||
GitHubTarballPackage.__init__(self, 'mono', 'xsp', '4.7',
|
||||
'72b24c04c9246dc1005a3cd1a37398777613880d',
|
||||
GitHubTarballPackage.__init__(self, 'mono', 'xsp', '4.7.1',
|
||||
'b7190dd996b2c652630297ed9b1b9907602b0d4f',
|
||||
configure='./autogen.sh --prefix="%{package_prefix}"')
|
||||
|
||||
def install(self):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
isPrivate = (env.JENKINS_URL ==~ /.*jenkins\.internalx\.com.*/ ? true : false)
|
||||
isPr = (env.ghprbPullId && !env.ghprbPullId.empty ? true : false)
|
||||
monoBranch = (isPr ? "pr" : env.BRANCH_NAME)
|
||||
isReleaseJob = (!isPr && monoBranch ==~ /201\d-\d\d/) // check if we're on a 2017-xx branch, i.e. release
|
||||
isReleaseJob = (!isPr && monoBranch ==~ /20\d\d-\d\d/) // check if we're on a 2017-xx branch, i.e. release
|
||||
jobName = (isPr ? "build-package-osx-mono-pullrequest" : isPrivate ? "build-package-osx-mono-private" : "build-package-osx-mono")
|
||||
windowsJobName = (isPr ? "build-package-win-mono-pullrequest" : isPrivate ? "build-package-win-mono-private/${monoBranch}" : "build-package-win-mono/${monoBranch}")
|
||||
isWindowsPrBuild = (isPr && env.ghprbCommentBody.contains("@monojenkins build pkg and msi"))
|
||||
|
||||
@@ -65,6 +65,10 @@ parallel (
|
||||
}
|
||||
},
|
||||
"WASM Linux": {
|
||||
if (monoBranch != 'master') {
|
||||
echo "Skipping WASM build on non-master branch."
|
||||
return
|
||||
}
|
||||
throttle(['provisions-wasm-toolchain']) {
|
||||
node ("ubuntu-1804-amd64") {
|
||||
archive ("wasm", "release", "Linux", "ubuntu-1804-amd64-preview", "npm dotnet-sdk-2.1 nuget openjdk-8-jre python3-pip")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
isPr = (env.ghprbPullId && !env.ghprbPullId.empty ? true : false)
|
||||
monoBranch = (isPr ? "pr" : env.BRANCH_NAME)
|
||||
isReleaseJob = (!isPr && monoBranch ==~ /201\d-\d\d/) // check if we're on a 2017-xx branch, i.e. release
|
||||
isReleaseJob = (!isPr && monoBranch ==~ /20\d\d-\d\d/) // check if we're on a 2017-xx branch, i.e. release
|
||||
jobName = (isPr ? "build-package-win-mono-pullrequest" : "build-package-win-mono")
|
||||
macJobName = (isPr ? "build-package-osx-mono-pullrequest" : "build-package-osx-mono/${monoBranch}")
|
||||
packageFileNameX86 = null
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ function report_github_status {
|
||||
if [ -z "${ghprbActualCommit}" ]; then echo "Not a pull request. Skipping GitHub manual status report."; return 1; fi;
|
||||
if [ -z "${GITHUB_STATUS_AUTH_TOKEN}" ]; then echo "No auth token specified. Skipping GitHub manual status report."; return 1; fi;
|
||||
|
||||
wget -qO- --header "Content-Type: application/json" --post-data "{\"state\": \"$1\", \"context\":\"$2\", \"description\": \"$3\", \"target_url\": \"$4\"}" "https://api.github.com/repos/mono/mono/statuses/${ghprbActualCommit}?access_token=${GITHUB_STATUS_AUTH_TOKEN}"
|
||||
wget -qO- --header "Content-Type: application/json" --header "Authorization: token ${GITHUB_STATUS_AUTH_TOKEN}" --post-data "{\"state\": \"$1\", \"context\":\"$2\", \"description\": \"$3\", \"target_url\": \"$4\"}" "https://api.github.com/repos/mono/mono/statuses/${ghprbActualCommit}"
|
||||
}
|
||||
|
||||
function helix_set_env_vars {
|
||||
|
||||
@@ -77,22 +77,22 @@ MONO_LIBS= \
|
||||
libmono-btls-shared.so \
|
||||
libmono-native.so
|
||||
|
||||
$(patsubst %,app/src/main/jniLibs/armeabi-v7a/%,$(MONO_LIBS)): app/src/main/jniLibs/armeabi-v7a/%: $(TOP)/sdks/out/android-armeabi-v7a-$(CONFIGURATION)/lib/% | app/src/main/jniLibs/armeabi-v7a
|
||||
$(patsubst %,app/src/main/jniLibs/armeabi-v7a/%,$(MONO_LIBS)): app/src/main/jniLibs/armeabi-v7a/%: $(TOP)/sdks/out/android$(INTERPRETER)-armeabi-v7a-$(CONFIGURATION)/lib/% | app/src/main/jniLibs/armeabi-v7a
|
||||
cp $< $@
|
||||
|
||||
.stamp-package: $(patsubst %,app/src/main/jniLibs/armeabi-v7a/%,$(MONO_LIBS))
|
||||
|
||||
$(patsubst %,app/src/main/jniLibs/arm64-v8a/%,$(MONO_LIBS)): app/src/main/jniLibs/arm64-v8a/%: $(TOP)/sdks/out/android-arm64-v8a-$(CONFIGURATION)/lib/% | app/src/main/jniLibs/arm64-v8a
|
||||
$(patsubst %,app/src/main/jniLibs/arm64-v8a/%,$(MONO_LIBS)): app/src/main/jniLibs/arm64-v8a/%: $(TOP)/sdks/out/android$(INTERPRETER)-arm64-v8a-$(CONFIGURATION)/lib/% | app/src/main/jniLibs/arm64-v8a
|
||||
cp $< $@
|
||||
|
||||
.stamp-package: $(patsubst %,app/src/main/jniLibs/arm64-v8a/%,$(MONO_LIBS))
|
||||
|
||||
$(patsubst %,app/src/main/jniLibs/x86/%,$(MONO_LIBS)): app/src/main/jniLibs/x86/%: $(TOP)/sdks/out/android-x86-$(CONFIGURATION)/lib/% | app/src/main/jniLibs/x86
|
||||
$(patsubst %,app/src/main/jniLibs/x86/%,$(MONO_LIBS)): app/src/main/jniLibs/x86/%: $(TOP)/sdks/out/android$(INTERPRETER)-x86-$(CONFIGURATION)/lib/% | app/src/main/jniLibs/x86
|
||||
cp $< $@
|
||||
|
||||
.stamp-package: $(patsubst %,app/src/main/jniLibs/x86/%,$(MONO_LIBS))
|
||||
|
||||
$(patsubst %,app/src/main/jniLibs/x86_64/%,$(MONO_LIBS)): app/src/main/jniLibs/x86_64/%: $(TOP)/sdks/out/android-x86_64-$(CONFIGURATION)/lib/% | app/src/main/jniLibs/x86_64
|
||||
$(patsubst %,app/src/main/jniLibs/x86_64/%,$(MONO_LIBS)): app/src/main/jniLibs/x86_64/%: $(TOP)/sdks/out/android$(INTERPRETER)-x86_64-$(CONFIGURATION)/lib/% | app/src/main/jniLibs/x86_64
|
||||
cp $< $@
|
||||
|
||||
.stamp-package: $(patsubst %,app/src/main/jniLibs/x86_64/%,$(MONO_LIBS))
|
||||
|
||||
@@ -102,6 +102,7 @@ typedef void (*mono_jit_parse_options_fn) (int argc, char * argv[]);
|
||||
typedef void (*mono_debug_init_fn) (MonoDebugFormat format);
|
||||
typedef gboolean (*mini_parse_debug_option_fn) (const char *option);
|
||||
typedef void (*mono_jit_cleanup_fn) (MonoDomain *domain);
|
||||
typedef void (*mono_jit_set_aot_mode_fn) (int /* MonoAotMode */ mode);
|
||||
|
||||
typedef MonoArray *(*mono_array_new_fn) (MonoDomain *domain, MonoClass *eclass, uintptr_t n);
|
||||
typedef MonoClass *(*mono_get_string_class_fn) (void);
|
||||
@@ -132,6 +133,7 @@ static mono_get_string_class_fn mono_get_string_class;
|
||||
static mono_dllmap_insert_fn mono_dllmap_insert;
|
||||
static mini_parse_debug_option_fn mini_parse_debug_option;
|
||||
static mono_jit_cleanup_fn mono_jit_cleanup;
|
||||
static mono_jit_set_aot_mode_fn mono_jit_set_aot_mode;
|
||||
|
||||
static MonoAssembly *main_assembly;
|
||||
static void *runtime_bootstrap_dso;
|
||||
@@ -395,6 +397,7 @@ Java_org_mono_android_AndroidRunner_runTests (JNIEnv* env, jobject thiz, jstring
|
||||
DLSYM (mono_thread_attach);
|
||||
DLSYM (mono_trace_init);
|
||||
DLSYM (mono_trace_set_log_handler);
|
||||
DLSYM (mono_jit_set_aot_mode);
|
||||
|
||||
#undef DLSYM
|
||||
|
||||
@@ -413,6 +416,8 @@ Java_org_mono_android_AndroidRunner_runTests (JNIEnv* env, jobject thiz, jstring
|
||||
setenv ("MONO_LOG_MASK", "all", 1);
|
||||
// setenv ("MONO_VERBOSE_METHOD", "GetCallingAssembly", 1);
|
||||
|
||||
mono_jit_set_aot_mode (1000 /* MONO_EE_MODE_INTERP */);
|
||||
|
||||
mono_trace_init ();
|
||||
mono_trace_set_log_handler (_runtime_log, NULL);
|
||||
|
||||
|
||||
+32
-22
@@ -23,6 +23,8 @@ else ifeq ($(UNAME),Linux)
|
||||
ANDROID_LIBCLANG = $(ANDROID_TOOLCHAIN_DIR)/ndk/toolchains/llvm/prebuilt/linux-x86_64/lib64/libclang.so.8svn
|
||||
endif
|
||||
|
||||
COMMA := ,
|
||||
|
||||
##
|
||||
# Parameters:
|
||||
# $(1): target
|
||||
@@ -86,54 +88,54 @@ endif
|
||||
# $(2): arch
|
||||
# $(3): abi_name
|
||||
# $(4): host_triple
|
||||
# $(5): interpreter (either '-interpreter' or empty)
|
||||
#
|
||||
# Flags:
|
||||
# android-$(1)_CFLAGS
|
||||
# android-$(1)_CXXFLAGS
|
||||
# android-$(1)_LDFLAGS
|
||||
define AndroidTargetTemplate
|
||||
_android$(5)-$(1)_AR=$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-ar
|
||||
_android$(5)-$(1)_AS=$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-as
|
||||
_android$(5)-$(1)_CC=$$(CCACHE) $$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-clang
|
||||
_android$(5)-$(1)_CXX=$$(CCACHE) $$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-clang++
|
||||
_android$(5)-$(1)_CPP=$$(CCACHE) $$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-$$(if $(wildcard $$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-cpp),cpp,clang -E)
|
||||
_android$(5)-$(1)_CXXCPP=$$(CCACHE) $$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-$$(if $(wildcard $$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-cpp),cpp,clang++ -E)
|
||||
_android$(5)-$(1)_DLLTOOL=
|
||||
_android$(5)-$(1)_LD=$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-ld
|
||||
_android$(5)-$(1)_OBJDUMP="$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-objdump"
|
||||
_android$(5)-$(1)_RANLIB=$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-ranlib
|
||||
_android$(5)-$(1)_CMAKE=$$(ANDROID_SDK_PREFIX)/cmake/$(ANDROID_CMAKE_VERSION)/bin/cmake
|
||||
_android$(5)-$(1)_STRIP=$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-strip
|
||||
|
||||
_android-$(1)_AR=$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-ar
|
||||
_android-$(1)_AS=$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-as
|
||||
_android-$(1)_CC=$$(CCACHE) $$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-clang
|
||||
_android-$(1)_CXX=$$(CCACHE) $$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-clang++
|
||||
_android-$(1)_CPP=$$(CCACHE) $$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-$$(if $(wildcard $$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-cpp),cpp,clang -E)
|
||||
_android-$(1)_CXXCPP=$$(CCACHE) $$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-$$(if $(wildcard $$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-cpp),cpp,clang++ -E)
|
||||
_android-$(1)_DLLTOOL=
|
||||
_android-$(1)_LD=$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-ld
|
||||
_android-$(1)_OBJDUMP="$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-objdump"
|
||||
_android-$(1)_RANLIB=$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-ranlib
|
||||
_android-$(1)_CMAKE=$$(ANDROID_SDK_PREFIX)/cmake/$(ANDROID_CMAKE_VERSION)/bin/cmake
|
||||
_android-$(1)_STRIP=$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-strip
|
||||
|
||||
_android-$(1)_AC_VARS= \
|
||||
_android$(5)-$(1)_AC_VARS= \
|
||||
mono_cv_uscore=yes \
|
||||
ac_cv_func_sched_getaffinity=no \
|
||||
ac_cv_func_sched_setaffinity=no \
|
||||
ac_cv_func_shm_open_working_with_mmap=no
|
||||
|
||||
_android-$(1)_CFLAGS= \
|
||||
_android$(5)-$(1)_CFLAGS= \
|
||||
-fstack-protector \
|
||||
-DMONODROID=1 $$(if $$(filter $$(ANDROID_NEW_NDK),yes),-D__ANDROID_API__=$$(ANDROID_SDK_VERSION_$(1)))
|
||||
|
||||
_android-$(1)_CXXFLAGS= \
|
||||
_android$(5)-$(1)_CXXFLAGS= \
|
||||
-fstack-protector \
|
||||
-DMONODROID=1 $$(if $$(filter $$(ANDROID_NEW_NDK),yes),-D__ANDROID_API__=$$(ANDROID_SDK_VERSION_$(1)))
|
||||
|
||||
|
||||
_android-$(1)_CPPFLAGS= \
|
||||
_android$(5)-$(1)_CPPFLAGS= \
|
||||
-I$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/sysroot/usr/include
|
||||
|
||||
_android-$(1)_CXXCPPFLAGS= \
|
||||
_android$(5)-$(1)_CXXCPPFLAGS= \
|
||||
-I$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/sysroot/usr/include
|
||||
|
||||
_android-$(1)_LDFLAGS= \
|
||||
_android$(5)-$(1)_LDFLAGS= \
|
||||
-z now -z relro -z noexecstack \
|
||||
-ldl -lm -llog -lc -lgcc \
|
||||
-Wl,-rpath-link=$$(ANDROID_TOOLCHAIN_DIR)/ndk/platforms/android-$$(ANDROID_SDK_VERSION_$(1))/arch-$(2)/usr/lib,-dynamic-linker=/system/bin/linker \
|
||||
-L$$(ANDROID_TOOLCHAIN_DIR)/ndk/platforms/android-$$(ANDROID_SDK_VERSION_$(1))/arch-$(2)/usr/lib
|
||||
|
||||
_android-$(1)_CONFIGURE_FLAGS= \
|
||||
_android$(5)-$(1)_CONFIGURE_FLAGS= \
|
||||
--disable-boehm \
|
||||
--disable-executables \
|
||||
--disable-iconv \
|
||||
@@ -141,7 +143,7 @@ _android-$(1)_CONFIGURE_FLAGS= \
|
||||
--disable-nls \
|
||||
--enable-dynamic-btls \
|
||||
--enable-maintainer-mode \
|
||||
--enable-minimal=ssa,portability,attach,verifier,full_messages,sgen_remset,sgen_marksweep_par,sgen_marksweep_fixed,sgen_marksweep_fixed_par,sgen_copying,logging,security,shared_handles,interpreter,gac,cfgdir_config \
|
||||
--enable-minimal=ssa,portability,attach,verifier,full_messages,sgen_remset,sgen_marksweep_par,sgen_marksweep_fixed,sgen_marksweep_fixed_par,sgen_copying,logging,security,shared_handles,$$(if $(5),,interpreter$$(COMMA)),gac,cfgdir_config \
|
||||
--enable-monodroid \
|
||||
--with-btls-android-ndk=$$(ANDROID_TOOLCHAIN_DIR)/ndk \
|
||||
--with-btls-android-api=$$(ANDROID_SDK_VERSION_$(1)) \
|
||||
@@ -154,11 +156,15 @@ _android-$(1)_CONFIGURE_FLAGS= \
|
||||
--disable-hybrid-suspend \
|
||||
--disable-crash-reporting
|
||||
|
||||
ifeq ($(5),-interpreter)
|
||||
.stamp-android$(5)-$(1)-toolchain: .stamp-android-$(1)-toolchain
|
||||
else
|
||||
.stamp-android-$(1)-toolchain: | $$(if $$(IGNORE_PROVISION_ANDROID),,provision-android)
|
||||
$(PYTHON) "$$(ANDROID_TOOLCHAIN_DIR)/ndk/build/tools/make_standalone_toolchain.py" --verbose --force --api=$$(ANDROID_SDK_VERSION_$(1)) --arch=$(2) --install-dir=$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang
|
||||
touch $$@
|
||||
endif
|
||||
|
||||
$$(eval $$(call RuntimeTemplate,android,$(1),$(4)))
|
||||
$$(eval $$(call RuntimeTemplate,android,$(1),$(4),,$(5)))
|
||||
|
||||
endef
|
||||
|
||||
@@ -190,6 +196,7 @@ ifeq ($(UNAME),Windows)
|
||||
$(eval $(call AndroidTargetTemplateStub,armeabi-v7a,arm,arm-linux-androideabi,armv5-linux-androideabi))
|
||||
else
|
||||
$(eval $(call AndroidTargetTemplate,armeabi-v7a,arm,arm-linux-androideabi,armv5-linux-androideabi))
|
||||
$(eval $(call AndroidTargetTemplate,armeabi-v7a,arm,arm-linux-androideabi,armv5-linux-androideabi,-interpreter))
|
||||
endif
|
||||
|
||||
## android-arm64-v8a
|
||||
@@ -199,6 +206,7 @@ ifeq ($(UNAME),Windows)
|
||||
$(eval $(call AndroidTargetTemplateStub,arm64-v8a,arm64,aarch64-linux-android,aarch64-linux-android))
|
||||
else
|
||||
$(eval $(call AndroidTargetTemplate,arm64-v8a,arm64,aarch64-linux-android,aarch64-linux-android))
|
||||
$(eval $(call AndroidTargetTemplate,arm64-v8a,arm64,aarch64-linux-android,aarch64-linux-android,-interpreter))
|
||||
endif
|
||||
|
||||
## android-x86
|
||||
@@ -206,6 +214,7 @@ ifeq ($(UNAME),Windows)
|
||||
$(eval $(call AndroidTargetTemplateStub,x86,x86,i686-linux-android,i686-linux-android))
|
||||
else
|
||||
$(eval $(call AndroidTargetTemplate,x86,x86,i686-linux-android,i686-linux-android))
|
||||
$(eval $(call AndroidTargetTemplate,x86,x86,i686-linux-android,i686-linux-android,-interpreter))
|
||||
endif
|
||||
|
||||
## android-x86_64
|
||||
@@ -215,6 +224,7 @@ ifeq ($(UNAME),Windows)
|
||||
$(eval $(call AndroidTargetTemplateStub,x86_64,x86_64,x86_64-linux-android,x86_64-linux-android))
|
||||
else
|
||||
$(eval $(call AndroidTargetTemplate,x86_64,x86_64,x86_64-linux-android,x86_64-linux-android))
|
||||
$(eval $(call AndroidTargetTemplate,x86_64,x86_64,x86_64-linux-android,x86_64-linux-android,-interpreter))
|
||||
endif
|
||||
|
||||
##
|
||||
|
||||
+30
-30
@@ -518,9 +518,9 @@ $(ios_FRAMEWORKS_DIR): package-ios-target32 package-ios-target32s package-ios-ta
|
||||
$(ios_PLATFORM_BIN)/install_name_tool -id @rpath/Mono.framework/Mono $(ios_FRAMEWORKS_DIR)/ios/Mono.framework/Mono
|
||||
$(ios_PLATFORM_BIN)/install_name_tool -id @rpath/Mono.framework/Mono $(ios_FRAMEWORKS_DIR)/tvos/Mono.framework/Mono
|
||||
$(ios_PLATFORM_BIN)/install_name_tool -id @rpath/Mono.framework/Mono $(ios_FRAMEWORKS_DIR)/watchos/Mono.framework/Mono
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_FRAMEWORKS_DIR)/ios/Mono.framework.dSYM $(ios_FRAMEWORKS_DIR)/ios/Mono.framework/Mono
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_FRAMEWORKS_DIR)/tvos/Mono.framework.dSYM $(ios_FRAMEWORKS_DIR)/tvos/Mono.framework/Mono
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_FRAMEWORKS_DIR)/watchos/Mono.framework.dSYM $(ios_FRAMEWORKS_DIR)/watchos/Mono.framework/Mono
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_FRAMEWORKS_DIR)/ios/Mono.framework.dSYM $(ios_FRAMEWORKS_DIR)/ios/Mono.framework/Mono
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_FRAMEWORKS_DIR)/tvos/Mono.framework.dSYM $(ios_FRAMEWORKS_DIR)/tvos/Mono.framework/Mono
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_FRAMEWORKS_DIR)/watchos/Mono.framework.dSYM $(ios_FRAMEWORKS_DIR)/watchos/Mono.framework/Mono
|
||||
cp $(TOP)/sdks/builds/ios-Mono.framework-Info.plist $(ios_FRAMEWORKS_DIR)/ios/Mono.framework/Info.plist
|
||||
cp $(TOP)/sdks/builds/ios-Mono.framework-tvos.Info.plist $(ios_FRAMEWORKS_DIR)/tvos/Mono.framework/Info.plist
|
||||
cp $(TOP)/sdks/builds/ios-Mono.framework-watchos.Info.plist $(ios_FRAMEWORKS_DIR)/watchos/Mono.framework/Info.plist
|
||||
@@ -535,9 +535,9 @@ $(ios_FRAMEWORKS_DIR): package-ios-target32 package-ios-target32s package-ios-ta
|
||||
$(ios_PLATFORM_BIN)/install_name_tool -id @rpath/Mono.framework/Mono $(ios_FRAMEWORKS_DIR)/ios-sim/Mono.framework/Mono
|
||||
$(ios_PLATFORM_BIN)/install_name_tool -id @rpath/Mono.framework/Mono $(ios_FRAMEWORKS_DIR)/tvos-sim/Mono.framework/Mono
|
||||
$(ios_PLATFORM_BIN)/install_name_tool -id @rpath/Mono.framework/Mono $(ios_FRAMEWORKS_DIR)/watchos-sim/Mono.framework/Mono
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_FRAMEWORKS_DIR)/ios-sim/Mono.framework.dSYM $(ios_FRAMEWORKS_DIR)/ios-sim/Mono.framework/Mono
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_FRAMEWORKS_DIR)/tvos-sim/Mono.framework.dSYM $(ios_FRAMEWORKS_DIR)/tvos-sim/Mono.framework/Mono
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_FRAMEWORKS_DIR)/watchos-sim/Mono.framework.dSYM $(ios_FRAMEWORKS_DIR)/watchos-sim/Mono.framework/Mono
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_FRAMEWORKS_DIR)/ios-sim/Mono.framework.dSYM $(ios_FRAMEWORKS_DIR)/ios-sim/Mono.framework/Mono
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_FRAMEWORKS_DIR)/tvos-sim/Mono.framework.dSYM $(ios_FRAMEWORKS_DIR)/tvos-sim/Mono.framework/Mono
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_FRAMEWORKS_DIR)/watchos-sim/Mono.framework.dSYM $(ios_FRAMEWORKS_DIR)/watchos-sim/Mono.framework/Mono
|
||||
cp $(TOP)/sdks/builds/ios-Mono.framework-Info.plist $(ios_FRAMEWORKS_DIR)/ios-sim/Mono.framework/Info.plist
|
||||
cp $(TOP)/sdks/builds/ios-Mono.framework-tvos.Info.plist $(ios_FRAMEWORKS_DIR)/tvos-sim/Mono.framework/Info.plist
|
||||
cp $(TOP)/sdks/builds/ios-Mono.framework-watchos.Info.plist $(ios_FRAMEWORKS_DIR)/watchos-sim/Mono.framework/Info.plist
|
||||
@@ -610,20 +610,20 @@ $(ios_LIBS_DIR): package-ios-target32 package-ios-target32s package-ios-target64
|
||||
$(ios_PLATFORM_BIN)/install_name_tool -id @rpath/libmono-native-compat.dylib -change $(TOP)/sdks/out/ios-targetwatch-$(CONFIGURATION)/lib/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib $(ios_LIBS_DIR)/watchos/libmono-native-compat.dylib
|
||||
$(ios_PLATFORM_BIN)/install_name_tool -id @rpath/libmono-native-unified.dylib -change $(TOP)/sdks/out/ios-targetwatch-$(CONFIGURATION)/lib/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib -change $(TOP)/sdks/out/ios-targetwatch64_32-$(CONFIGURATION)/lib/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib $(ios_LIBS_DIR)/watchos/libmono-native-unified.dylib
|
||||
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/ios/libmonosgen-2.0.dylib.dSYM $(ios_LIBS_DIR)/ios/libmonosgen-2.0.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/ios/libmono-profiler-log.dylib.dSYM $(ios_LIBS_DIR)/ios/libmono-profiler-log.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/ios/libmono-native-compat.dylib.dSYM $(ios_LIBS_DIR)/ios/libmono-native-compat.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/ios/libmono-native-unified.dylib.dSYM $(ios_LIBS_DIR)/ios/libmono-native-unified.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/ios/libmonosgen-2.0.dylib.dSYM $(ios_LIBS_DIR)/ios/libmonosgen-2.0.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/ios/libmono-profiler-log.dylib.dSYM $(ios_LIBS_DIR)/ios/libmono-profiler-log.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/ios/libmono-native-compat.dylib.dSYM $(ios_LIBS_DIR)/ios/libmono-native-compat.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/ios/libmono-native-unified.dylib.dSYM $(ios_LIBS_DIR)/ios/libmono-native-unified.dylib
|
||||
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/tvos/libmonosgen-2.0.dylib.dSYM $(ios_LIBS_DIR)/tvos/libmonosgen-2.0.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/tvos/libmono-profiler-log.dylib.dSYM $(ios_LIBS_DIR)/tvos/libmono-profiler-log.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/tvos/libmono-native-compat.dylib.dSYM $(ios_LIBS_DIR)/tvos/libmono-native-compat.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/tvos/libmono-native-unified.dylib.dSYM $(ios_LIBS_DIR)/tvos/libmono-native-unified.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/tvos/libmonosgen-2.0.dylib.dSYM $(ios_LIBS_DIR)/tvos/libmonosgen-2.0.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/tvos/libmono-profiler-log.dylib.dSYM $(ios_LIBS_DIR)/tvos/libmono-profiler-log.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/tvos/libmono-native-compat.dylib.dSYM $(ios_LIBS_DIR)/tvos/libmono-native-compat.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/tvos/libmono-native-unified.dylib.dSYM $(ios_LIBS_DIR)/tvos/libmono-native-unified.dylib
|
||||
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/watchos/libmonosgen-2.0.dylib.dSYM $(ios_LIBS_DIR)/watchos/libmonosgen-2.0.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/watchos/libmono-profiler-log.dylib.dSYM $(ios_LIBS_DIR)/watchos/libmono-profiler-log.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/watchos/libmono-native-compat.dylib.dSYM $(ios_LIBS_DIR)/watchos/libmono-native-compat.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/watchos/libmono-native-unified.dylib.dSYM $(ios_LIBS_DIR)/watchos/libmono-native-unified.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/watchos/libmonosgen-2.0.dylib.dSYM $(ios_LIBS_DIR)/watchos/libmonosgen-2.0.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/watchos/libmono-profiler-log.dylib.dSYM $(ios_LIBS_DIR)/watchos/libmono-profiler-log.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/watchos/libmono-native-compat.dylib.dSYM $(ios_LIBS_DIR)/watchos/libmono-native-compat.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/watchos/libmono-native-unified.dylib.dSYM $(ios_LIBS_DIR)/watchos/libmono-native-unified.dylib
|
||||
|
||||
### libs for simulators ###
|
||||
mkdir -p $(ios_LIBS_DIR)/ios-sim/
|
||||
@@ -672,20 +672,20 @@ $(ios_LIBS_DIR): package-ios-target32 package-ios-target32s package-ios-target64
|
||||
$(ios_PLATFORM_BIN)/install_name_tool -id @rpath/libmono-native-compat.dylib $(ios_LIBS_DIR)/watchos-sim/libmono-native-compat.dylib
|
||||
$(ios_PLATFORM_BIN)/install_name_tool -id @rpath/libmono-native-unified.dylib $(ios_LIBS_DIR)/watchos-sim/libmono-native-unified.dylib
|
||||
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/ios-sim/libmonosgen-2.0.dylib.dSYM $(ios_LIBS_DIR)/ios-sim/libmonosgen-2.0.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/ios-sim/libmono-profiler-log.dylib.dSYM $(ios_LIBS_DIR)/ios-sim/libmono-profiler-log.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/ios-sim/libmono-native-compat.dylib.dSYM $(ios_LIBS_DIR)/ios-sim/libmono-native-compat.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/ios-sim/libmono-native-unified.dylib.dSYM $(ios_LIBS_DIR)/ios-sim/libmono-native-unified.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/ios-sim/libmonosgen-2.0.dylib.dSYM $(ios_LIBS_DIR)/ios-sim/libmonosgen-2.0.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/ios-sim/libmono-profiler-log.dylib.dSYM $(ios_LIBS_DIR)/ios-sim/libmono-profiler-log.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/ios-sim/libmono-native-compat.dylib.dSYM $(ios_LIBS_DIR)/ios-sim/libmono-native-compat.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/ios-sim/libmono-native-unified.dylib.dSYM $(ios_LIBS_DIR)/ios-sim/libmono-native-unified.dylib
|
||||
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/tvos-sim/libmonosgen-2.0.dylib.dSYM $(ios_LIBS_DIR)/tvos-sim/libmonosgen-2.0.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/tvos-sim/libmono-profiler-log.dylib.dSYM $(ios_LIBS_DIR)/tvos-sim/libmono-profiler-log.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/tvos-sim/libmono-native-compat.dylib.dSYM $(ios_LIBS_DIR)/tvos-sim/libmono-native-compat.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/tvos-sim/libmono-native-unified.dylib.dSYM $(ios_LIBS_DIR)/tvos-sim/libmono-native-unified.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/tvos-sim/libmonosgen-2.0.dylib.dSYM $(ios_LIBS_DIR)/tvos-sim/libmonosgen-2.0.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/tvos-sim/libmono-profiler-log.dylib.dSYM $(ios_LIBS_DIR)/tvos-sim/libmono-profiler-log.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/tvos-sim/libmono-native-compat.dylib.dSYM $(ios_LIBS_DIR)/tvos-sim/libmono-native-compat.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/tvos-sim/libmono-native-unified.dylib.dSYM $(ios_LIBS_DIR)/tvos-sim/libmono-native-unified.dylib
|
||||
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/watchos-sim/libmonosgen-2.0.dylib.dSYM $(ios_LIBS_DIR)/watchos-sim/libmonosgen-2.0.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/watchos-sim/libmono-profiler-log.dylib.dSYM $(ios_LIBS_DIR)/watchos-sim/libmono-profiler-log.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/watchos-sim/libmono-native-compat.dylib.dSYM $(ios_LIBS_DIR)/watchos-sim/libmono-native-compat.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -t 4 -o $(ios_LIBS_DIR)/watchos-sim/libmono-native-unified.dylib.dSYM $(ios_LIBS_DIR)/watchos-sim/libmono-native-unified.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/watchos-sim/libmonosgen-2.0.dylib.dSYM $(ios_LIBS_DIR)/watchos-sim/libmonosgen-2.0.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/watchos-sim/libmono-profiler-log.dylib.dSYM $(ios_LIBS_DIR)/watchos-sim/libmono-profiler-log.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/watchos-sim/libmono-native-compat.dylib.dSYM $(ios_LIBS_DIR)/watchos-sim/libmono-native-compat.dylib
|
||||
$(ios_PLATFORM_BIN)/dsymutil -num-threads 4 -o $(ios_LIBS_DIR)/watchos-sim/libmono-native-unified.dylib.dSYM $(ios_LIBS_DIR)/watchos-sim/libmono-native-unified.dylib
|
||||
|
||||
$(ios_SOURCES_DIR)/mcs/build/common/Consts.cs: # we use this as a sentinel file to avoid rsyncing everything on each build (slows down iterating)
|
||||
mkdir -p $(ios_SOURCES_DIR)
|
||||
|
||||
+58
-61
@@ -5,6 +5,7 @@
|
||||
# $(2): target
|
||||
# $(3): host triple
|
||||
# $(4): exclude from archive
|
||||
# $(5): interpreter (either '-interpreter' or empty)
|
||||
#
|
||||
# Flags:
|
||||
# _$(1)-$(2)_AR
|
||||
@@ -28,87 +29,87 @@
|
||||
# _$(1)-$(2)_PATH
|
||||
define RuntimeTemplate
|
||||
|
||||
_runtime_$(1)-$(2)_BITNESS=$$(if $$(or $$(findstring i686,$(3)),$$(findstring i386,$(3))),-m32,$$(if $$(findstring x86_64,$(3)),-m64))
|
||||
_runtime_$(1)$(5)-$(2)_BITNESS=$$(if $$(or $$(findstring i686,$(3)),$$(findstring i386,$(3))),-m32,$$(if $$(findstring x86_64,$(3)),-m64))
|
||||
|
||||
_runtime_$(1)-$(2)_CFLAGS=$(if $(RELEASE),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) $$(_$(1)-$(2)_CFLAGS) $$($(1)-$(2)_CFLAGS) $$(_runtime_$(1)-$(2)_BITNESS)
|
||||
_runtime_$(1)-$(2)_CXXFLAGS=$(if $(RELEASE),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) $$(_$(1)-$(2)_CXXFLAGS) $$($(1)-$(2)_CXXFLAGS) $$(_runtime_$(1)-$(2)_BITNESS)
|
||||
_runtime_$(1)-$(2)_CPPFLAGS=$(if $(RELEASE),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) $$(_$(1)-$(2)_CPPFLAGS) $$($(1)-$(2)_CPPFLAGS) $$(_runtime_$(1)-$(2)_BITNESS)
|
||||
_runtime_$(1)-$(2)_CXXCPPFLAGS=$(if $(RELEASE),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) $$(_$(1)-$(2)_CXXCPPFLAGS) $$($(1)-$(2)_CXXCPPFLAGS) $$(_runtime_$(1)-$(2)_BITNESS)
|
||||
_runtime_$(1)-$(2)_LDFLAGS=$$(_$(1)-$(2)_LDFLAGS) $$($(1)-$(2)_LDFLAGS)
|
||||
_runtime_$(1)$(5)-$(2)_CFLAGS=$(if $(RELEASE),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) $$(_$(1)$(5)-$(2)_CFLAGS) $$($(1)$(5)-$(2)_CFLAGS) $$(_runtime_$(1)$(5)-$(2)_BITNESS)
|
||||
_runtime_$(1)$(5)-$(2)_CXXFLAGS=$(if $(RELEASE),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) $$(_$(1)$(5)-$(2)_CXXFLAGS) $$($(1)$(5)-$(2)_CXXFLAGS) $$(_runtime_$(1)$(5)-$(2)_BITNESS)
|
||||
_runtime_$(1)$(5)-$(2)_CPPFLAGS=$(if $(RELEASE),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) $$(_$(1)$(5)-$(2)_CPPFLAGS) $$($(1)$(5)-$(2)_CPPFLAGS) $$(_runtime_$(1)$(5)-$(2)_BITNESS)
|
||||
_runtime_$(1)$(5)-$(2)_CXXCPPFLAGS=$(if $(RELEASE),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) $$(_$(1)$(5)-$(2)_CXXCPPFLAGS) $$($(1)$(5)-$(2)_CXXCPPFLAGS) $$(_runtime_$(1)$(5)-$(2)_BITNESS)
|
||||
_runtime_$(1)$(5)-$(2)_LDFLAGS=$$(_$(1)$(5)-$(2)_LDFLAGS) $$($(1)$(5)-$(2)_LDFLAGS)
|
||||
|
||||
_runtime_$(1)-$(2)_AC_VARS=$$(_$(1)-$(2)_AC_VARS) $$($(1)-$(2)_AC_VARS)
|
||||
_runtime_$(1)$(5)-$(2)_AC_VARS=$$(_$(1)$(5)-$(2)_AC_VARS) $$($(1)$(5)-$(2)_AC_VARS)
|
||||
|
||||
_runtime_$(1)-$(2)_CONFIGURE_ENVIRONMENT = \
|
||||
$(if $$(_$(1)-$(2)_AR),AR="$$(_$(1)-$(2)_AR)") \
|
||||
$(if $$(_$(1)-$(2)_AS),AS="$$(_$(1)-$(2)_AS)") \
|
||||
$(if $$(_$(1)-$(2)_CC),CC="$$(_$(1)-$(2)_CC)") \
|
||||
$(if $$(_$(1)-$(2)_CPP),CPP="$$(_$(1)-$(2)_CPP)") \
|
||||
$(if $$(_$(1)-$(2)_CXX),CXX="$$(_$(1)-$(2)_CXX)") \
|
||||
$(if $$(_$(1)-$(2)_CXXCPP),CXXCPP="$$(_$(1)-$(2)_CXXCPP)") \
|
||||
$(if $$(_$(1)-$(2)_DLLTOOL),DLLTOOL="$$(_$(1)-$(2)_DLLTOOL)") \
|
||||
$(if $$(_$(1)-$(2)_LD),LD="$$(_$(1)-$(2)_LD)") \
|
||||
$(if $$(_$(1)-$(2)_OBJDUMP),OBJDUMP="$$(_$(1)-$(2)_OBJDUMP)") \
|
||||
$(if $$(_$(1)-$(2)_RANLIB),RANLIB="$$(_$(1)-$(2)_RANLIB)") \
|
||||
$(if $$(_$(1)-$(2)_CMAKE),CMAKE="$$(_$(1)-$(2)_CMAKE)") \
|
||||
$(if $$(_$(1)-$(2)_STRIP),STRIP="$$(_$(1)-$(2)_STRIP)") \
|
||||
CFLAGS="$$(_runtime_$(1)-$(2)_CFLAGS)" \
|
||||
CXXFLAGS="$$(_runtime_$(1)-$(2)_CXXFLAGS)" \
|
||||
CPPFLAGS="$$(_runtime_$(1)-$(2)_CPPFLAGS)" \
|
||||
CXXCPPFLAGS="$$(_runtime_$(1)-$(2)_CXXCPPFLAGS)" \
|
||||
LDFLAGS="$$(_runtime_$(1)-$(2)_LDFLAGS)" \
|
||||
$$(_$(1)-$(2)_CONFIGURE_ENVIRONMENT) \
|
||||
$$($(1)-$(2)_CONFIGURE_ENVIRONMENT)
|
||||
_runtime_$(1)$(5)-$(2)_CONFIGURE_ENVIRONMENT = \
|
||||
$(if $$(_$(1)$(5)-$(2)_AR),AR="$$(_$(1)$(5)-$(2)_AR)") \
|
||||
$(if $$(_$(1)$(5)-$(2)_AS),AS="$$(_$(1)$(5)-$(2)_AS)") \
|
||||
$(if $$(_$(1)$(5)-$(2)_CC),CC="$$(_$(1)$(5)-$(2)_CC)") \
|
||||
$(if $$(_$(1)$(5)-$(2)_CPP),CPP="$$(_$(1)$(5)-$(2)_CPP)") \
|
||||
$(if $$(_$(1)$(5)-$(2)_CXX),CXX="$$(_$(1)$(5)-$(2)_CXX)") \
|
||||
$(if $$(_$(1)$(5)-$(2)_CXXCPP),CXXCPP="$$(_$(1)$(5)-$(2)_CXXCPP)") \
|
||||
$(if $$(_$(1)$(5)-$(2)_DLLTOOL),DLLTOOL="$$(_$(1)$(5)-$(2)_DLLTOOL)") \
|
||||
$(if $$(_$(1)$(5)-$(2)_LD),LD="$$(_$(1)$(5)-$(2)_LD)") \
|
||||
$(if $$(_$(1)$(5)-$(2)_OBJDUMP),OBJDUMP="$$(_$(1)$(5)-$(2)_OBJDUMP)") \
|
||||
$(if $$(_$(1)$(5)-$(2)_RANLIB),RANLIB="$$(_$(1)$(5)-$(2)_RANLIB)") \
|
||||
$(if $$(_$(1)$(5)-$(2)_CMAKE),CMAKE="$$(_$(1)$(5)-$(2)_CMAKE)") \
|
||||
$(if $$(_$(1)$(5)-$(2)_STRIP),STRIP="$$(_$(1)$(5)-$(2)_STRIP)") \
|
||||
CFLAGS="$$(_runtime_$(1)$(5)-$(2)_CFLAGS)" \
|
||||
CXXFLAGS="$$(_runtime_$(1)$(5)-$(2)_CXXFLAGS)" \
|
||||
CPPFLAGS="$$(_runtime_$(1)$(5)-$(2)_CPPFLAGS)" \
|
||||
CXXCPPFLAGS="$$(_runtime_$(1)$(5)-$(2)_CXXCPPFLAGS)" \
|
||||
LDFLAGS="$$(_runtime_$(1)$(5)-$(2)_LDFLAGS)" \
|
||||
$$(_$(1)$(5)-$(2)_CONFIGURE_ENVIRONMENT) \
|
||||
$$($(1)$(5)-$(2)_CONFIGURE_ENVIRONMENT)
|
||||
|
||||
_runtime_$(1)-$(2)_CONFIGURE_FLAGS= \
|
||||
_runtime_$(1)$(5)-$(2)_CONFIGURE_FLAGS= \
|
||||
$$(if $(3),--host=$(3)) \
|
||||
--cache-file=$$(TOP)/sdks/builds/$(1)-$(2)-$$(CONFIGURATION).config.cache \
|
||||
--prefix=$$(TOP)/sdks/out/$(1)-$(2)-$$(CONFIGURATION) \
|
||||
--cache-file=$$(TOP)/sdks/builds/$(1)$(5)-$(2)-$$(CONFIGURATION).config.cache \
|
||||
--prefix=$$(TOP)/sdks/out/$(1)$(5)-$(2)-$$(CONFIGURATION) \
|
||||
$$(if $$(ENABLE_CXX),--enable-cxx) \
|
||||
$$(_cross-runtime_$(1)-$(2)_CONFIGURE_FLAGS) \
|
||||
$$(_$(1)-$(2)_CONFIGURE_FLAGS) \
|
||||
$$($(1)-$(2)_CONFIGURE_FLAGS)
|
||||
$$(_cross-runtime_$(1)$(5)-$(2)_CONFIGURE_FLAGS) \
|
||||
$$(_$(1)$(5)-$(2)_CONFIGURE_FLAGS) \
|
||||
$$($(1)$(5)-$(2)_CONFIGURE_FLAGS)
|
||||
|
||||
.stamp-$(1)-$(2)-$$(CONFIGURATION)-configure: $$(TOP)/configure .stamp-$(1)-$(2)-toolchain
|
||||
mkdir -p $$(TOP)/sdks/builds/$(1)-$(2)-$$(CONFIGURATION)
|
||||
$(if $$(_$(1)-$(2)_PATH),PATH="$$$$PATH:$$(_$(1)-$(2)_PATH)") ./wrap-configure.sh $$(TOP)/sdks/builds/$(1)-$(2)-$$(CONFIGURATION) $$(abspath $$<) $$(_runtime_$(1)-$(2)_AC_VARS) $$(_runtime_$(1)-$(2)_CONFIGURE_ENVIRONMENT) $$(_runtime_$(1)-$(2)_CONFIGURE_FLAGS)
|
||||
.stamp-$(1)$(5)-$(2)-$$(CONFIGURATION)-configure: $$(TOP)/configure .stamp-$(1)$(5)-$(2)-toolchain
|
||||
mkdir -p $$(TOP)/sdks/builds/$(1)$(5)-$(2)-$$(CONFIGURATION)
|
||||
$(if $$(_$(1)$(5)-$(2)_PATH),PATH="$$$$PATH:$$(_$(1)$(5)-$(2)_PATH)") ./wrap-configure.sh $$(TOP)/sdks/builds/$(1)$(5)-$(2)-$$(CONFIGURATION) $$(abspath $$<) $$(_runtime_$(1)$(5)-$(2)_AC_VARS) $$(_runtime_$(1)$(5)-$(2)_CONFIGURE_ENVIRONMENT) $$(_runtime_$(1)$(5)-$(2)_CONFIGURE_FLAGS)
|
||||
touch $$@
|
||||
|
||||
.stamp-$(1)-$(2)-configure: .stamp-$(1)-$(2)-$$(CONFIGURATION)-configure
|
||||
.stamp-$(1)$(5)-$(2)-configure: .stamp-$(1)$(5)-$(2)-$$(CONFIGURATION)-configure
|
||||
touch $$@
|
||||
|
||||
.PHONY: build-custom-$(1)-$(2)
|
||||
build-custom-$(1)-$(2):
|
||||
$$(MAKE) -C $(1)-$(2)-$$(CONFIGURATION)
|
||||
.PHONY: build-custom-$(1)$(5)-$(2)
|
||||
build-custom-$(1)$(5)-$(2):
|
||||
$$(MAKE) -C $(1)$(5)-$(2)-$$(CONFIGURATION)
|
||||
|
||||
.PHONY: setup-custom-$(1)-$(2)
|
||||
setup-custom-$(1)-$(2):
|
||||
mkdir -p $$(TOP)/sdks/out/$(1)-$(2)-$$(CONFIGURATION)
|
||||
.PHONY: setup-custom-$(1)$(5)-$(2)
|
||||
setup-custom-$(1)$(5)-$(2):
|
||||
mkdir -p $$(TOP)/sdks/out/$(1)$(5)-$(2)-$$(CONFIGURATION)
|
||||
|
||||
.PHONY: package-$(1)-$(2)
|
||||
package-$(1)-$(2):
|
||||
$$(MAKE) -C $$(TOP)/sdks/builds/$(1)-$(2)-$$(CONFIGURATION)/mono install
|
||||
$$(MAKE) -C $$(TOP)/sdks/builds/$(1)-$(2)-$$(CONFIGURATION)/support install
|
||||
.PHONY: package-$(1)$(5)-$(2)
|
||||
package-$(1)$(5)-$(2):
|
||||
$$(MAKE) -C $$(TOP)/sdks/builds/$(1)$(5)-$(2)-$$(CONFIGURATION)/mono install
|
||||
$$(MAKE) -C $$(TOP)/sdks/builds/$(1)$(5)-$(2)-$$(CONFIGURATION)/support install
|
||||
|
||||
.PHONY: clean-$(1)-$(2)
|
||||
clean-$(1)-$(2):
|
||||
rm -rf .stamp-$(1)-$(2)-toolchain .stamp-$(1)-$(2)-$$(CONFIGURATION)-configure $$(TOP)/sdks/builds/toolchains/$(1)-$(2) $$(TOP)/sdks/builds/$(1)-$(2)-$$(CONFIGURATION) $$(TOP)/sdks/builds/$(1)-$(2)-$$(CONFIGURATION).config.cache $$(TOP)/sdks/out/$(1)-$(2)-$$(CONFIGURATION)
|
||||
.PHONY: clean-$(1)$(5)-$(2)
|
||||
clean-$(1)$(5)-$(2):
|
||||
rm -rf .stamp-$(1)$(5)-$(2)-toolchain .stamp-$(1)$(5)-$(2)-$$(CONFIGURATION)-configure $$(TOP)/sdks/builds/toolchains/$(1)$(5)-$(2) $$(TOP)/sdks/builds/$(1)$(5)-$(2)-$$(CONFIGURATION) $$(TOP)/sdks/builds/$(1)$(5)-$(2)-$$(CONFIGURATION).config.cache $$(TOP)/sdks/out/$(1)$(5)-$(2)-$$(CONFIGURATION)
|
||||
|
||||
$$(eval $$(call TargetTemplate,$(1),$(2)))
|
||||
$$(eval $$(call TargetTemplate,$(1)$(5),$(2)))
|
||||
|
||||
.PHONY: configure-$(1)
|
||||
configure-$(1): configure-$(1)-$(2)
|
||||
configure-$(1): configure-$(1)$(5)-$(2)
|
||||
|
||||
.PHONY: build-$(1)
|
||||
build-$(1): build-$(1)-$(2)
|
||||
build-$(1): build-$(1)$(5)-$(2)
|
||||
|
||||
.PHONY: package-$(1)
|
||||
package-$(1): package-$(1)-$(2) $$(ADDITIONAL_PACKAGE_DEPS)
|
||||
package-$(1): package-$(1)$(5)-$(2) $$(ADDITIONAL_PACKAGE_DEPS)
|
||||
|
||||
.PHONY: archive-$(1)
|
||||
archive-$(1): package-$(1)
|
||||
|
||||
ifneq ($(4),yes)
|
||||
$(1)_ARCHIVE += $(1)-$(2)-$$(CONFIGURATION)
|
||||
$(1)_ARCHIVE += $(1)$(5)-$(2)-$$(CONFIGURATION)
|
||||
endif
|
||||
|
||||
endef
|
||||
@@ -220,8 +221,8 @@ _cross-runtime_$(1)-$(2)_CONFIGURE_FLAGS= \
|
||||
|
||||
.stamp-$(1)-$(2)-$$(CONFIGURATION)-configure: | $$(if $$(IGNORE_PROVISION_LLVM),,provision-$(6))
|
||||
|
||||
$$(TOP)/sdks/builds/$(1)-$(2)-$$(CONFIGURATION)/$(4).h: .stamp-offsets-tool-py-setup .stamp-$(1)-$(2)-$$(CONFIGURATION)-configure | configure-$(1)-$(5)
|
||||
. $(TOP)/tools/offsets-tool-py/offtool/bin/activate && PYTHONPATH=$(TOP)/tools/offsets-tool-py python3 $(TOP)/tools/offsets-tool-py/offsets-tool.py --targetdir="$$(TOP)/sdks/builds/$(1)-$(5)-$$(CONFIGURATION)" --abi=$(7) --monodir="$$(TOP)" --outfile="$$@" $$(_$(1)-$(2)_OFFSETS_DUMPER_ARGS)
|
||||
$$(TOP)/sdks/builds/$(1)-$(2)-$$(CONFIGURATION)/$(4).h: .stamp-$(1)-$(2)-$$(CONFIGURATION)-configure | configure-$(1)-$(5)
|
||||
python3 $(TOP)/mono/tools/offsets-tool/offsets-tool.py --targetdir="$$(TOP)/sdks/builds/$(1)-$(5)-$$(CONFIGURATION)" --abi=$(7) --monodir="$$(TOP)" --outfile="$$@" $$(_$(1)-$(2)_OFFSETS_DUMPER_ARGS)
|
||||
|
||||
build-$(1)-$(2): $$(TOP)/sdks/builds/$(1)-$(2)-$$(CONFIGURATION)/$(4).h
|
||||
|
||||
@@ -234,10 +235,6 @@ $(1)_ARCHIVE += $(6)
|
||||
|
||||
endef
|
||||
|
||||
.stamp-offsets-tool-py-setup:
|
||||
$(MAKE) -C $(TOP)/tools/offsets-tool-py setup
|
||||
touch $@
|
||||
|
||||
##
|
||||
# Parameters:
|
||||
# $(1): product
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ MONO_LIBS = $(TOP)/sdks/out/wasm-runtime-release/lib/{libmono-ee-interp.a,libmon
|
||||
MONO_THREADS_LIBS = $(TOP)/sdks/out/wasm-runtime-threads-release/lib/{libmono-ee-interp.a,libmono-native.a,libmono-icall-table.a,libmonosgen-2.0.a,libmono-ilgen.a}
|
||||
MONO_DYNAMIC_LIBS = $(TOP)/sdks/out/wasm-runtime-dynamic-release/lib/{libmono-ee-interp.a,libmono-native.a,libmono-icall-table.a,libmonosgen-2.0.a,libmono-ilgen.a}
|
||||
|
||||
EMCC_FLAGS=-s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s BINARYEN=1 -s ALIASING_FUNCTION_POINTERS=0 -s NO_EXIT_RUNTIME=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall', 'FS_createPath', 'FS_createDataFile', 'cwrap', 'setValue', 'getValue', 'UTF8ToString', 'addFunction']" -s USE_ZLIB=1 -s "EXPORTED_FUNCTIONS=['_putchar']" --source-map-base http://example.com -s WASM_OBJECT_FILES=0 -s FORCE_FILESYSTEM=1
|
||||
EMCC_FLAGS=--profiling-funcs -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s BINARYEN=1 -s ALIASING_FUNCTION_POINTERS=0 -s NO_EXIT_RUNTIME=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall', 'FS_createPath', 'FS_createDataFile', 'cwrap', 'setValue', 'getValue', 'UTF8ToString', 'addFunction']" -s USE_ZLIB=1 -s "EXPORTED_FUNCTIONS=['_putchar']" --source-map-base http://example.com -s WASM_OBJECT_FILES=0 -s FORCE_FILESYSTEM=1
|
||||
EMCC_DEBUG_FLAGS =-g4 -Os -s ASSERTIONS=1
|
||||
EMCC_RELEASE_FLAGS=-Oz --llvm-opts 2 --llvm-lto 1
|
||||
EMCC_DYNAMIC_FLAGS=-s MAIN_MODULE=1 -s EXPORT_ALL=1 -s DISABLE_EXCEPTION_CATCHING=0 -s ALLOW_TABLE_GROWTH=1 -s USE_ZLIB=0 -s WASM_OBJECT_FILES=0 -DWASM_SUPPORTS_DLOPEN
|
||||
|
||||
@@ -38,14 +38,13 @@ namespace WebAssembly.Net.Debugging {
|
||||
}
|
||||
|
||||
public static Result Ok (JObject ok)
|
||||
{
|
||||
return new Result (ok, null);
|
||||
}
|
||||
=> new Result (ok, null);
|
||||
|
||||
public static Result Err (JObject err)
|
||||
{
|
||||
return new Result (null, err);
|
||||
}
|
||||
=> new Result (null, err);
|
||||
|
||||
public static Result Exception (Exception e)
|
||||
=> new Result (null, JObject.FromObject (new { message = e.Message }));
|
||||
|
||||
public JObject ToJObject (MessageId target) {
|
||||
if (IsOk) {
|
||||
@@ -353,10 +352,10 @@ namespace WebAssembly.Net.Debugging {
|
||||
{
|
||||
switch (priority) {
|
||||
case "protocol":
|
||||
Console.WriteLine (msg);
|
||||
//Console.WriteLine (msg);
|
||||
break;
|
||||
case "verbose":
|
||||
Console.WriteLine (msg);
|
||||
//Console.WriteLine (msg);
|
||||
break;
|
||||
case "info":
|
||||
case "warning":
|
||||
|
||||
@@ -11,16 +11,44 @@ using System.Net;
|
||||
namespace WebAssembly.Net.Debugging {
|
||||
|
||||
internal class MonoCommands {
|
||||
public const string GET_CALL_STACK = "MONO.mono_wasm_get_call_stack()";
|
||||
public const string IS_RUNTIME_READY_VAR = "MONO.mono_wasm_runtime_is_ready";
|
||||
public const string START_SINGLE_STEPPING = "MONO.mono_wasm_start_single_stepping({0})";
|
||||
public const string GET_SCOPE_VARIABLES = "MONO.mono_wasm_get_variables({0}, [ {1} ])";
|
||||
public const string SET_BREAK_POINT = "MONO.mono_wasm_set_breakpoint(\"{0}\", {1}, {2})";
|
||||
public const string REMOVE_BREAK_POINT = "MONO.mono_wasm_remove_breakpoint({0})";
|
||||
public const string GET_LOADED_FILES = "MONO.mono_wasm_get_loaded_files()";
|
||||
public const string CLEAR_ALL_BREAKPOINTS = "MONO.mono_wasm_clear_all_breakpoints()";
|
||||
public const string GET_OBJECT_PROPERTIES = "MONO.mono_wasm_get_object_properties({0})";
|
||||
public const string GET_ARRAY_VALUES = "MONO.mono_wasm_get_array_values({0})";
|
||||
public string expression { get; set; }
|
||||
public string objectGroup { get; set; } = "mono-debugger";
|
||||
public bool includeCommandLineAPI { get; set; } = false;
|
||||
public bool silent { get; set; } = false;
|
||||
public bool returnByValue { get; set; } = true;
|
||||
|
||||
public MonoCommands (string expression)
|
||||
=> this.expression = expression;
|
||||
|
||||
public static MonoCommands GetCallStack ()
|
||||
=> new MonoCommands ("MONO.mono_wasm_get_call_stack()");
|
||||
|
||||
public static MonoCommands IsRuntimeReady ()
|
||||
=> new MonoCommands ("MONO.mono_wasm_runtime_is_ready");
|
||||
|
||||
public static MonoCommands StartSingleStepping (StepKind kind)
|
||||
=> new MonoCommands ($"MONO.mono_wasm_start_single_stepping ({(int)kind})");
|
||||
|
||||
public static MonoCommands GetLoadedFiles ()
|
||||
=> new MonoCommands ("MONO.mono_wasm_get_loaded_files()");
|
||||
|
||||
public static MonoCommands ClearAllBreakpoints ()
|
||||
=> new MonoCommands ("MONO.mono_wasm_clear_all_breakpoints()");
|
||||
|
||||
public static MonoCommands GetObjectProperties (int objectId)
|
||||
=> new MonoCommands ($"MONO.mono_wasm_get_object_properties({objectId})");
|
||||
|
||||
public static MonoCommands GetArrayValues (int objectId)
|
||||
=> new MonoCommands ($"MONO.mono_wasm_get_array_values({objectId})");
|
||||
|
||||
public static MonoCommands GetScopeVariables (int scopeId, params int[] vars)
|
||||
=> new MonoCommands ($"MONO.mono_wasm_get_variables({scopeId}, [ {string.Join (",", vars)} ])");
|
||||
|
||||
public static MonoCommands SetBreakpoint (string assemblyName, int methodToken, int ilOffset)
|
||||
=> new MonoCommands ($"MONO.mono_wasm_set_breakpoint (\"{assemblyName}\", {methodToken}, {ilOffset})");
|
||||
|
||||
public static MonoCommands RemoveBreakpoint (int breakpointId)
|
||||
=> new MonoCommands ($"MONO.mono_wasm_remove_breakpoint({breakpointId})");
|
||||
}
|
||||
|
||||
public enum MonoErrorCodes {
|
||||
@@ -44,7 +72,6 @@ namespace WebAssembly.Net.Debugging {
|
||||
public int Id { get; private set; }
|
||||
}
|
||||
|
||||
|
||||
class Breakpoint {
|
||||
public SourceLocation Location { get; private set; }
|
||||
public int LocalId { get; private set; }
|
||||
@@ -82,6 +109,9 @@ namespace WebAssembly.Net.Debugging {
|
||||
|
||||
public MonoProxy () { }
|
||||
|
||||
internal Task<Result> SendMonoCommand (SessionId id, MonoCommands cmd, CancellationToken token)
|
||||
=> SendCommand (id, "Runtime.evaluate", JObject.FromObject (cmd), token);
|
||||
|
||||
protected override async Task<bool> AcceptEvent (SessionId sessionId, string method, JObject args, CancellationToken token)
|
||||
{
|
||||
switch (method) {
|
||||
@@ -101,7 +131,7 @@ namespace WebAssembly.Net.Debugging {
|
||||
//TODO figure out how to stich out more frames and, in particular what happens when real wasm is on the stack
|
||||
var top_func = args? ["callFrames"]? [0]? ["functionName"]?.Value<string> ();
|
||||
if (top_func == "mono_wasm_fire_bp" || top_func == "_mono_wasm_fire_bp") {
|
||||
await OnBreakPointHit (sessionId, args, token);
|
||||
await OnBreakpointHit (sessionId, args, token);
|
||||
return true;
|
||||
}
|
||||
if (top_func == MonoConstants.RUNTIME_IS_READY) {
|
||||
@@ -118,7 +148,8 @@ namespace WebAssembly.Net.Debugging {
|
||||
break;
|
||||
}
|
||||
case "Debugger.enabled": {
|
||||
await LoadStore (new SessionId { sessionId = args? ["sessionId"]?.Value<string> () }, token);
|
||||
if (store == null)
|
||||
await LoadStore (new SessionId { sessionId = args? ["sessionId"]?.Value<string> () }, token);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -163,7 +194,7 @@ namespace WebAssembly.Net.Debugging {
|
||||
}
|
||||
|
||||
case "Debugger.setBreakpointByUrl": {
|
||||
Log ("info", $"BP req {args}");
|
||||
Log ("verbose", $"BP req {args}");
|
||||
var bp_req = BreakPointRequest.Parse (args, store);
|
||||
if (bp_req != null) {
|
||||
await SetBreakPoint (id, bp_req, token);
|
||||
@@ -217,11 +248,11 @@ namespace WebAssembly.Net.Debugging {
|
||||
break;
|
||||
}
|
||||
case "object": {
|
||||
await GetDetails (id, int.Parse (parts[2]), token, MonoCommands.GET_OBJECT_PROPERTIES);
|
||||
await GetDetails (id, MonoCommands.GetObjectProperties (int.Parse (parts[2])), token);
|
||||
break;
|
||||
}
|
||||
case "array": {
|
||||
await GetDetails (id, int.Parse (parts[2]), token, MonoCommands.GET_ARRAY_VALUES);
|
||||
await GetDetails (id, MonoCommands.GetArrayValues (int.Parse (parts [2])), token);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -243,19 +274,11 @@ namespace WebAssembly.Net.Debugging {
|
||||
}
|
||||
|
||||
//static int frame_id=0;
|
||||
async Task OnBreakPointHit (SessionId sessionId, JObject args, CancellationToken token)
|
||||
async Task OnBreakpointHit (SessionId sessionId, JObject args, CancellationToken token)
|
||||
{
|
||||
//FIXME we should send release objects every now and then? Or intercept those we inject and deal in the runtime
|
||||
var o = JObject.FromObject (new {
|
||||
expression = MonoCommands.GET_CALL_STACK,
|
||||
objectGroup = "mono_debugger",
|
||||
includeCommandLineAPI = false,
|
||||
silent = false,
|
||||
returnByValue = true
|
||||
});
|
||||
|
||||
var res = await SendMonoCommand (sessionId, MonoCommands.GetCallStack(), token);
|
||||
var orig_callframes = args? ["callFrames"]?.Values<JObject> ();
|
||||
var res = await SendCommand (sessionId, "Runtime.evaluate", o, token);
|
||||
|
||||
if (res.IsErr) {
|
||||
//Give up and send the original call stack
|
||||
@@ -362,7 +385,7 @@ namespace WebAssembly.Net.Debugging {
|
||||
if (bp != null)
|
||||
bp_list [0] = $"dotnet:{bp.LocalId}";
|
||||
|
||||
o = JObject.FromObject (new {
|
||||
var o = JObject.FromObject (new {
|
||||
callFrames = callFrames,
|
||||
reason = "other", //other means breakpoint
|
||||
hitBreakpoints = bp_list,
|
||||
@@ -380,19 +403,11 @@ namespace WebAssembly.Net.Debugging {
|
||||
b.State = BreakPointState.Pending;
|
||||
}
|
||||
this.runtime_ready = false;
|
||||
|
||||
var o = JObject.FromObject (new {
|
||||
expression = MonoCommands.IS_RUNTIME_READY_VAR,
|
||||
objectGroup = "mono_debugger",
|
||||
includeCommandLineAPI = false,
|
||||
silent = false,
|
||||
returnByValue = true
|
||||
});
|
||||
this.ctx_id = ctx_id.id;
|
||||
this.aux_ctx_data = aux_data;
|
||||
|
||||
Log ("verbose", "checking if the runtime is ready");
|
||||
var res = await SendCommand (ctx_id, "Runtime.evaluate", o, token);
|
||||
var res = await SendMonoCommand (ctx_id, MonoCommands.IsRuntimeReady (), token);
|
||||
var is_ready = res.Value? ["result"]? ["value"]?.Value<bool> ();
|
||||
//Log ("verbose", $"\t{is_ready}");
|
||||
if (is_ready.HasValue && is_ready.Value == true) {
|
||||
@@ -401,7 +416,6 @@ namespace WebAssembly.Net.Debugging {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async Task OnResume (CancellationToken token)
|
||||
{
|
||||
//discard frames
|
||||
@@ -411,16 +425,7 @@ namespace WebAssembly.Net.Debugging {
|
||||
|
||||
async Task Step (MessageId msg_id, StepKind kind, CancellationToken token)
|
||||
{
|
||||
|
||||
var o = JObject.FromObject (new {
|
||||
expression = string.Format (MonoCommands.START_SINGLE_STEPPING, (int)kind),
|
||||
objectGroup = "mono_debugger",
|
||||
includeCommandLineAPI = false,
|
||||
silent = false,
|
||||
returnByValue = true,
|
||||
});
|
||||
|
||||
var res = await SendCommand (msg_id, "Runtime.evaluate", o, token);
|
||||
var res = await SendMonoCommand (msg_id, MonoCommands.StartSingleStepping (kind), token);
|
||||
|
||||
SendResponse (msg_id, Result.Ok (new JObject ()), token);
|
||||
|
||||
@@ -429,18 +434,19 @@ namespace WebAssembly.Net.Debugging {
|
||||
await SendCommand (msg_id, "Debugger.resume", new JObject (), token);
|
||||
}
|
||||
|
||||
async Task GetDetails(MessageId msg_id, int object_id, CancellationToken token, string command)
|
||||
static string FormatFieldName (string name)
|
||||
{
|
||||
var o = JObject.FromObject(new
|
||||
{
|
||||
expression = string.Format(command, object_id),
|
||||
objectGroup = "mono_debugger",
|
||||
includeCommandLineAPI = false,
|
||||
silent = false,
|
||||
returnByValue = true,
|
||||
});
|
||||
if (name.Contains("k__BackingField")) {
|
||||
return name.Replace("k__BackingField", "")
|
||||
.Replace("<", "")
|
||||
.Replace(">", "");
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
var res = await SendCommand(msg_id, "Runtime.evaluate", o, token);
|
||||
async Task GetDetails(MessageId msg_id, MonoCommands cmd, CancellationToken token)
|
||||
{
|
||||
var res = await SendMonoCommand(msg_id, cmd, token);
|
||||
|
||||
//if we fail we just buble that to the IDE (and let it panic over it)
|
||||
if (res.IsErr)
|
||||
@@ -458,12 +464,7 @@ namespace WebAssembly.Net.Debugging {
|
||||
// so skip returning variable values in that case.
|
||||
for (int i = 0; i < values.Length; i+=2)
|
||||
{
|
||||
string fieldName = (string)values[i]["name"];
|
||||
if (fieldName.Contains("k__BackingField")){
|
||||
fieldName = fieldName.Replace("k__BackingField", "");
|
||||
fieldName = fieldName.Replace("<", "");
|
||||
fieldName = fieldName.Replace(">", "");
|
||||
}
|
||||
string fieldName = FormatFieldName ((string)values[i]["name"]);
|
||||
var value = values [i + 1]? ["value"];
|
||||
if (((string)value ["description"]) == null)
|
||||
value ["description"] = value ["value"]?.ToString ();
|
||||
@@ -474,14 +475,17 @@ namespace WebAssembly.Net.Debugging {
|
||||
}));
|
||||
|
||||
}
|
||||
o = JObject.FromObject(new
|
||||
var response = JObject.FromObject(new
|
||||
{
|
||||
result = var_list
|
||||
});
|
||||
|
||||
SendResponse(msg_id, Result.Ok(response), token);
|
||||
} catch (Exception e) {
|
||||
Log ("verbose", $"failed to parse {res.Value} - {e.Message}");
|
||||
SendResponse(msg_id, Result.Exception(e), token);
|
||||
}
|
||||
SendResponse(msg_id, Result.Ok(o), token);
|
||||
|
||||
}
|
||||
|
||||
async Task GetScopeProperties (MessageId msg_id, int scope_id, CancellationToken token)
|
||||
@@ -490,17 +494,8 @@ namespace WebAssembly.Net.Debugging {
|
||||
var vars = scope.Method.GetLiveVarsAt (scope.Location.CliLocation.Offset);
|
||||
|
||||
|
||||
var var_ids = string.Join (",", vars.Select (v => v.Index));
|
||||
|
||||
var o = JObject.FromObject (new {
|
||||
expression = string.Format (MonoCommands.GET_SCOPE_VARIABLES, scope.Id, var_ids),
|
||||
objectGroup = "mono_debugger",
|
||||
includeCommandLineAPI = false,
|
||||
silent = false,
|
||||
returnByValue = true,
|
||||
});
|
||||
|
||||
var res = await SendCommand (msg_id, "Runtime.evaluate", o, token);
|
||||
var var_ids = vars.Select (v => v.Index).ToArray ();
|
||||
var res = await SendMonoCommand (msg_id, MonoCommands.GetScopeVariables (scope.Id, var_ids), token);
|
||||
|
||||
//if we fail we just buble that to the IDE (and let it panic over it)
|
||||
if (res.IsErr) {
|
||||
@@ -545,13 +540,13 @@ namespace WebAssembly.Net.Debugging {
|
||||
}));
|
||||
i = i + 2;
|
||||
}
|
||||
o = JObject.FromObject (new {
|
||||
var o = JObject.FromObject (new {
|
||||
result = var_list
|
||||
});
|
||||
SendResponse (msg_id, Result.Ok (o), token);
|
||||
} catch (Exception exception) {
|
||||
Log ("verbose", $"Error resolving scope properties {exception.Message}");
|
||||
SendResponse (msg_id, res, token);
|
||||
SendResponse (msg_id, Result.Exception (exception), token);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -561,15 +556,7 @@ namespace WebAssembly.Net.Debugging {
|
||||
var method_token = bp.Location.CliLocation.Method.Token;
|
||||
var il_offset = bp.Location.CliLocation.Offset;
|
||||
|
||||
var o = JObject.FromObject (new {
|
||||
expression = string.Format (MonoCommands.SET_BREAK_POINT, asm_name, method_token, il_offset),
|
||||
objectGroup = "mono_debugger",
|
||||
includeCommandLineAPI = false,
|
||||
silent = false,
|
||||
returnByValue = true,
|
||||
});
|
||||
|
||||
var res = await SendCommand (sessionId, "Runtime.evaluate", o, token);
|
||||
var res = await SendMonoCommand (sessionId, MonoCommands.SetBreakpoint (asm_name, method_token, il_offset), token);
|
||||
var ret_code = res.Value? ["result"]? ["value"]?.Value<int> ();
|
||||
|
||||
if (ret_code.HasValue) {
|
||||
@@ -583,15 +570,7 @@ namespace WebAssembly.Net.Debugging {
|
||||
|
||||
async Task LoadStore (SessionId sessionId, CancellationToken token)
|
||||
{
|
||||
var o = JObject.FromObject (new {
|
||||
expression = MonoCommands.GET_LOADED_FILES,
|
||||
objectGroup = "mono_debugger",
|
||||
includeCommandLineAPI = false,
|
||||
silent = false,
|
||||
returnByValue = true,
|
||||
});
|
||||
|
||||
var loaded_pdbs = await SendCommand (sessionId, "Runtime.evaluate", o, token);
|
||||
var loaded_pdbs = await SendMonoCommand (sessionId, MonoCommands.GetLoadedFiles(), token);
|
||||
var the_value = loaded_pdbs.Value? ["result"]? ["value"];
|
||||
var the_pdbs = the_value?.ToObject<string[]> ();
|
||||
|
||||
@@ -617,20 +596,11 @@ namespace WebAssembly.Net.Debugging {
|
||||
SendEvent (sessionId, "Debugger.scriptParsed", ok, token);
|
||||
}
|
||||
|
||||
var o = JObject.FromObject (new {
|
||||
expression = MonoCommands.CLEAR_ALL_BREAKPOINTS,
|
||||
objectGroup = "mono_debugger",
|
||||
includeCommandLineAPI = false,
|
||||
silent = false,
|
||||
returnByValue = true,
|
||||
});
|
||||
|
||||
var clear_result = await SendCommand (sessionId, "Runtime.evaluate", o, token);
|
||||
var clear_result = await SendMonoCommand (sessionId, MonoCommands.ClearAllBreakpoints (), token);
|
||||
if (clear_result.IsErr) {
|
||||
Log ("verbose", $"Failed to clear breakpoints due to {clear_result}");
|
||||
}
|
||||
|
||||
|
||||
runtime_ready = true;
|
||||
|
||||
foreach (var bp in breakpoints) {
|
||||
@@ -671,15 +641,7 @@ namespace WebAssembly.Net.Debugging {
|
||||
|
||||
async Task<Result> RemoveBreakPoint (SessionId sessionId, Breakpoint bp, CancellationToken token)
|
||||
{
|
||||
var o = JObject.FromObject (new {
|
||||
expression = string.Format (MonoCommands.REMOVE_BREAK_POINT, bp.RemoteId),
|
||||
objectGroup = "mono_debugger",
|
||||
includeCommandLineAPI = false,
|
||||
silent = false,
|
||||
returnByValue = true,
|
||||
});
|
||||
|
||||
var res = await SendCommand (sessionId, "Runtime.evaluate", o, token);
|
||||
var res = await SendMonoCommand (sessionId, MonoCommands.RemoveBreakpoint (bp.RemoteId), token);
|
||||
var ret_code = res.Value? ["result"]? ["value"]?.Value<int> ();
|
||||
|
||||
if (ret_code.HasValue) {
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace WebAssembly.Net.Debugging
|
||||
options.ChromePath = chromePath;
|
||||
options.AppPath = appPath;
|
||||
options.PagePath = pagePath;
|
||||
options.DevToolsUrl = new Uri ("http://localhost:9333");
|
||||
options.DevToolsUrl = new Uri ("http://localhost:0");
|
||||
});
|
||||
})
|
||||
.UseKestrel ()
|
||||
|
||||
@@ -9,8 +9,8 @@ using Microsoft.AspNetCore.Routing;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System.Net.Http;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace WebAssembly.Net.Debugging {
|
||||
internal class Startup {
|
||||
@@ -102,7 +102,7 @@ namespace WebAssembly.Net.Debugging {
|
||||
var version = await ProxyGetJsonAsync<Dictionary<string, string>> (GetEndpoint (context));
|
||||
context.Response.ContentType = "application/json";
|
||||
await context.Response.WriteAsync (
|
||||
JsonConvert.SerializeObject (mapFunc (version, context, devToolsHost)));
|
||||
JsonSerializer.Serialize (mapFunc (version, context, devToolsHost)));
|
||||
}
|
||||
|
||||
async Task RewriteArray (HttpContext context)
|
||||
@@ -110,7 +110,7 @@ namespace WebAssembly.Net.Debugging {
|
||||
var tabs = await ProxyGetJsonAsync<Dictionary<string, string> []> (GetEndpoint (context));
|
||||
var alteredTabs = tabs.Select (t => mapFunc (t, context, devToolsHost)).ToArray ();
|
||||
context.Response.ContentType = "application/json";
|
||||
await context.Response.WriteAsync (JsonConvert.SerializeObject (alteredTabs));
|
||||
await context.Response.WriteAsync (JsonSerializer.Serialize (alteredTabs));
|
||||
}
|
||||
|
||||
async Task ConnectProxy (HttpContext context)
|
||||
@@ -138,8 +138,7 @@ namespace WebAssembly.Net.Debugging {
|
||||
{
|
||||
using (var httpClient = new HttpClient ()) {
|
||||
var response = await httpClient.GetAsync (url);
|
||||
var jsonResponse = await response.Content.ReadAsStringAsync ();
|
||||
return JsonConvert.DeserializeObject<T> (jsonResponse);
|
||||
return await JsonSerializer.DeserializeAsync<T> (await response.Content.ReadAsStreamAsync ());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ Steps of execution are:
|
||||
```
|
||||
1. The WebAssembly modules dotnet.js, dotnet.wasm etc are then generated.
|
||||
``` bash
|
||||
emcc -Oz -g -s EMULATED_FUNCTION_POINTERS=1 -s DISABLE_EXCEPTION_CATCHING=0 -s ASSERTIONS=1 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s BINARYEN=1 -s "BINARYEN_TRAP_MODE='clamp'" -s TOTAL_MEMORY=134217728 -s ALIASING_FUNCTION_POINTERS=0 -s NO_EXIT_RUNTIME=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall', 'cwrap', 'setValue', 'getValue', 'UTF8ToString']" -s "EXPORTED_FUNCTIONS=['___cxa_is_pointer_type', '___cxa_can_catch']" -o bin/aot-mini/dotnet.js --js-library sdks/wasm/library_mono.js --js-library sdks/wasm/binding_support.js --js-library sdks/wasm/dotnet_support.js driver.o mini_tests.dll.bc mscorlib.dll.bc System.dll.bc Mono.Security.dll.bc System.Xml.dll.bc System.Numerics.dll.bc System.Core.dll.bc nunitlite.dll.bc aot-dummy.dll.bc sdks/out/wasm-runtime-release/lib/libmonosgen-2.0.a sdks/out/wasm-runtime-release/lib/libmono-native.a'
|
||||
emcc -Oz -g -s EMULATED_FUNCTION_POINTERS=1 -s DISABLE_EXCEPTION_CATCHING=0 -s ASSERTIONS=1 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s BINARYEN=1 -s "BINARYEN_TRAP_MODE='clamp'" -s TOTAL_MEMORY=134217728 -s ALIASING_FUNCTION_POINTERS=0 -s NO_EXIT_RUNTIME=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall', 'cwrap', 'setValue', 'getValue', 'UTF8ToString']" -s "EXPORTED_FUNCTIONS=['___cxa_is_pointer_type', '___cxa_can_catch']" -o bin/aot-mini/dotnet.js --js-library sdks/wasm/library_mono.js --js-library sdks/wasm/binding_support.js --js-library sdks/wasm/dotnet_support.js driver.o mini_tests.dll.bc mscorlib.dll.bc System.dll.bc Mono.Security.dll.bc System.Xml.dll.bc System.Numerics.dll.bc System.Core.dll.bc nunitlite.dll.bc aot-instances.dll.bc sdks/out/wasm-runtime-release/lib/libmonosgen-2.0.a sdks/out/wasm-runtime-release/lib/libmono-native.a'
|
||||
```
|
||||
### Example 1:
|
||||
``` bash
|
||||
|
||||
@@ -342,7 +342,7 @@ namespace WebAssembly.Net.WebSockets {
|
||||
private void AbortRequest ()
|
||||
{
|
||||
if (State == WebSocketState.Open) {
|
||||
var closeResult = CloseAsync (WebSocketCloseStatus.NormalClosure, "Connection was aborted", CancellationToken.None);
|
||||
var closeResult = CloseAsyncCore (WebSocketCloseStatus.NormalClosure, "Connection was aborted", CancellationToken.None);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -460,6 +460,12 @@ namespace WebAssembly.Net.WebSockets {
|
||||
public override async Task CloseAsync (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
|
||||
{
|
||||
ThrowIfNotConnected ();
|
||||
|
||||
await CloseAsyncCore (closeStatus, statusDescription, cancellationToken);
|
||||
}
|
||||
|
||||
private async Task CloseAsyncCore (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
|
||||
{
|
||||
ThrowOnInvalidState (State,
|
||||
WebSocketState.Open, WebSocketState.CloseReceived, WebSocketState.CloseSent);
|
||||
|
||||
|
||||
+14
-27
@@ -646,13 +646,6 @@ class Driver {
|
||||
if (vfs_prefix.EndsWith ("/"))
|
||||
vfs_prefix = vfs_prefix.Substring (0, vfs_prefix.Length - 1);
|
||||
|
||||
// the linker does not consider these core by default
|
||||
var wasm_core_assemblies = new Dictionary<string, bool> ();
|
||||
if (add_binding) {
|
||||
wasm_core_assemblies [BINDINGS_ASM_NAME] = true;
|
||||
wasm_core_assemblies [HTTP_ASM_NAME] = true;
|
||||
wasm_core_assemblies [WEBSOCKETS_ASM_NAME] = true;
|
||||
}
|
||||
// wasm core bindings module
|
||||
var wasm_core_bindings = string.Empty;
|
||||
if (add_binding) {
|
||||
@@ -686,16 +679,16 @@ class Driver {
|
||||
AssemblyData dedup_asm = null;
|
||||
|
||||
if (enable_dedup) {
|
||||
dedup_asm = new AssemblyData () { name = "aot-dummy",
|
||||
filename = "aot-dummy.dll",
|
||||
bc_path = "$builddir/aot-dummy.dll.bc",
|
||||
o_path = "$builddir/aot-dummy.dll.o",
|
||||
app_path = "$appdir/$deploy_prefix/aot-dummy.dll",
|
||||
linkout_path = "$builddir/linker-out/aot-dummy.dll",
|
||||
dedup_asm = new AssemblyData () { name = "aot-instances",
|
||||
filename = "aot-instances.dll",
|
||||
bc_path = "$builddir/aot-instances.dll.bc",
|
||||
o_path = "$builddir/aot-instances.dll.o",
|
||||
app_path = "$appdir/$deploy_prefix/aot-instances.dll",
|
||||
linkout_path = "$builddir/linker-out/aot-instances.dll",
|
||||
aot = true
|
||||
};
|
||||
assemblies.Add (dedup_asm);
|
||||
file_list.Add ("aot-dummy.dll");
|
||||
file_list.Add ("aot-instances.dll");
|
||||
}
|
||||
|
||||
var file_list_str = string.Join (",", file_list.Select (f => $"\"{Path.GetFileName (f)}\"").Distinct());
|
||||
@@ -841,6 +834,7 @@ class Driver {
|
||||
ninja.WriteLine ($"deploy_prefix = {deploy_prefix}");
|
||||
ninja.WriteLine ($"bcl_dir = {bcl_prefix}");
|
||||
ninja.WriteLine ($"bcl_facades_dir = {bcl_facades_prefix}");
|
||||
ninja.WriteLine ($"framework_dir = {framework_prefix}");
|
||||
ninja.WriteLine ($"tools_dir = {bcl_tools_prefix}");
|
||||
ninja.WriteLine ($"emsdk_env = $builddir/emsdk_env.sh");
|
||||
if (add_binding) {
|
||||
@@ -889,8 +883,8 @@ class Driver {
|
||||
ninja.WriteLine ("rule linker");
|
||||
ninja.WriteLine (" command = mono $tools_dir/monolinker.exe -out $builddir/linker-out -l none --deterministic --disable-opt unreachablebodies --exclude-feature com --exclude-feature remoting --exclude-feature etw $linker_args || exit 1; for f in $out; do if test ! -f $$f; then echo > empty.cs; csc /deterministic /nologo /out:$$f /target:library empty.cs; else touch $$f; fi; done");
|
||||
ninja.WriteLine (" description = [IL-LINK]");
|
||||
ninja.WriteLine ("rule aot-dummy");
|
||||
ninja.WriteLine (" command = echo > aot-dummy.cs; csc /deterministic /out:$out /target:library aot-dummy.cs");
|
||||
ninja.WriteLine ("rule aot-instances-dll");
|
||||
ninja.WriteLine (" command = echo > aot-instances.cs; csc /deterministic /out:$out /target:library aot-instances.cs");
|
||||
ninja.WriteLine ("rule gen-runtime-icall-table");
|
||||
ninja.WriteLine (" command = $cross --print-icall-table > $out");
|
||||
ninja.WriteLine ("rule gen-icall-table");
|
||||
@@ -1036,8 +1030,8 @@ class Driver {
|
||||
if (enable_dedup) {
|
||||
/*
|
||||
* Run the aot compiler in dedup mode:
|
||||
* mono --aot=<args>,dedup-include=aot-dummy.dll <assemblies> aot-dummy.dll
|
||||
* This will process all assemblies and emit all instances into the aot image of aot-dummy.dll
|
||||
* mono --aot=<args>,dedup-include=aot-instances.dll <assemblies> aot-instances.dll
|
||||
* This will process all assemblies and emit all instances into the aot image of aot-instances.dll
|
||||
*/
|
||||
var a = dedup_asm;
|
||||
/*
|
||||
@@ -1050,7 +1044,7 @@ class Driver {
|
||||
ninja.WriteLine ($" outfile={a.bc_path}.tmp");
|
||||
ninja.WriteLine ($" mono_path=$builddir/aot-in:{aot_in_path}");
|
||||
ninja.WriteLine ($"build {a.app_path}: cpifdiff {a.linkout_path}");
|
||||
ninja.WriteLine ($"build {a.linkout_path}: aot-dummy");
|
||||
ninja.WriteLine ($"build {a.linkout_path}: aot-instances-dll");
|
||||
// The dedup image might not have changed
|
||||
ninja.WriteLine ($"build {a.bc_path}: cpifdiff {a.bc_path}.tmp");
|
||||
ninja.WriteLine ($"build {a.o_path}: emcc {a.bc_path} | $emsdk_env");
|
||||
@@ -1115,17 +1109,10 @@ class Driver {
|
||||
}
|
||||
}
|
||||
|
||||
// the linker does not consider these core by default
|
||||
foreach (var assembly in wasm_core_assemblies.Keys) {
|
||||
linker_args += $"-p {coremode} {assembly} ";
|
||||
}
|
||||
if (linker_verbose) {
|
||||
linker_args += "--verbose ";
|
||||
}
|
||||
linker_args += $"-d linker-in -d $bcl_dir -d $bcl_facades_dir -c {coremode} -u {usermode} ";
|
||||
foreach (var assembly in wasm_core_assemblies.Keys) {
|
||||
linker_args += $"-r {assembly} ";
|
||||
}
|
||||
linker_args += $"-d linker-in -d $bcl_dir -d $bcl_facades_dir -d $framework_dir -c {coremode} -u {usermode} ";
|
||||
|
||||
ninja.WriteLine ("build $builddir/linker-out: mkdir");
|
||||
ninja.WriteLine ($"build {linker_ofiles}: linker {linker_infiles}");
|
||||
|
||||
@@ -295,64 +295,59 @@ var MonoSupportLib = {
|
||||
|
||||
mono_wasm_add_string_var: function(var_value) {
|
||||
if (var_value == 0) {
|
||||
MONO.var_info.push({
|
||||
value: {
|
||||
type: "object",
|
||||
subtype: "null"
|
||||
}
|
||||
});
|
||||
} else {
|
||||
MONO.var_info.push({
|
||||
value: {
|
||||
type: "string",
|
||||
value: Module.UTF8ToString (var_value),
|
||||
}
|
||||
});
|
||||
}
|
||||
MONO.mono_wasm_add_null_var ("string");
|
||||
return;
|
||||
}
|
||||
|
||||
MONO.var_info.push({
|
||||
value: {
|
||||
type: "string",
|
||||
value: Module.UTF8ToString (var_value),
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
mono_wasm_add_null_var: function(className)
|
||||
{
|
||||
MONO.var_info.push ({value: {
|
||||
type: "object",
|
||||
className: Module.UTF8ToString (className),
|
||||
description: Module.UTF8ToString (className),
|
||||
subtype: "null"
|
||||
}});
|
||||
},
|
||||
|
||||
mono_wasm_add_obj_var: function(className, objectId) {
|
||||
if (objectId == 0) {
|
||||
MONO.var_info.push({
|
||||
value: {
|
||||
type: "object",
|
||||
className: Module.UTF8ToString (className),
|
||||
description: Module.UTF8ToString (className),
|
||||
subtype: "null"
|
||||
}
|
||||
});
|
||||
} else {
|
||||
MONO.var_info.push({
|
||||
value: {
|
||||
type: "object",
|
||||
className: Module.UTF8ToString (className),
|
||||
description: Module.UTF8ToString (className),
|
||||
objectId: "dotnet:object:"+ objectId,
|
||||
}
|
||||
});
|
||||
MONO.mono_wasm_add_null_var (className);
|
||||
return;
|
||||
}
|
||||
|
||||
MONO.var_info.push({
|
||||
value: {
|
||||
type: "object",
|
||||
className: Module.UTF8ToString (className),
|
||||
description: Module.UTF8ToString (className),
|
||||
objectId: "dotnet:object:"+ objectId,
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
mono_wasm_add_array_var: function(className, objectId) {
|
||||
if (objectId == 0) {
|
||||
MONO.var_info.push({
|
||||
value: {
|
||||
type: "array",
|
||||
className: Module.UTF8ToString (className),
|
||||
description: Module.UTF8ToString (className),
|
||||
subtype: "null"
|
||||
}
|
||||
});
|
||||
} else {
|
||||
MONO.var_info.push({
|
||||
value: {
|
||||
type: "array",
|
||||
className: Module.UTF8ToString (className),
|
||||
description: Module.UTF8ToString (className),
|
||||
objectId: "dotnet:array:"+ objectId,
|
||||
}
|
||||
});
|
||||
MONO.mono_wasm_add_null_var (className);
|
||||
return;
|
||||
}
|
||||
|
||||
MONO.var_info.push({
|
||||
value: {
|
||||
type: "object",
|
||||
subtype: "array",
|
||||
className: Module.UTF8ToString (className),
|
||||
description: Module.UTF8ToString (className),
|
||||
objectId: "dotnet:array:"+ objectId,
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
mono_wasm_add_frame: function(il, method, name) {
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
<type fullname="System.Numerics.Vector">
|
||||
<method signature="System.Boolean get_IsHardwareAccelerated()" body="stub"/>
|
||||
</type>
|
||||
<type fullname="System.BitConverter">
|
||||
<field name="IsLittleEndian" value="true"/>
|
||||
</type>
|
||||
</assembly>
|
||||
|
||||
<assembly fullname="System.Private.CoreLib">
|
||||
@@ -45,7 +48,9 @@
|
||||
<type fullname="System.UIntPtr">
|
||||
<method signature="System.Int32 get_Size()" body="stub" value="4"/>
|
||||
</type>
|
||||
<!-- System.BitConverter::IsLittleEndian is a field -->
|
||||
<type fullname="System.BitConverter">
|
||||
<field name="IsLittleEndian" value="true"/>
|
||||
</type>
|
||||
<type fullname="System.Globalization.GlobalizationMode">
|
||||
<method signature="System.Boolean get_Invariant()" body="stub" value="true"/>
|
||||
</type>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
ACTIVATE=offtool/bin/activate
|
||||
|
||||
setup: $(ACTIVATE)
|
||||
|
||||
$(ACTIVATE):
|
||||
python3 -m pip install --user virtualenv
|
||||
# `virtualenv` might not end up in $PATH
|
||||
python3 -m virtualenv offtool
|
||||
|
||||
Reference in new issue
Block a user