diff --git a/eng/Subsets.props b/eng/Subsets.props index 190a2cffa7ebe..4af6e90f9172b 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -249,8 +249,8 @@ Category="clr" /> - - + + - + @@ -367,8 +367,8 @@ - - + + diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index d813dde6de27a..1c9d212d13592 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -76,7 +76,9 @@ elseif(TARGET_ARCH_NAME STREQUAL "s390x") set(TOOLCHAIN "s390x-linux-gnu") elseif(TARGET_ARCH_NAME STREQUAL "x64") set(CMAKE_SYSTEM_PROCESSOR x86_64) - if(LINUX) + if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/x86_64-alpine-linux-musl) + set(TOOLCHAIN "x86_64-alpine-linux-musl") + elseif(LINUX) set(TOOLCHAIN "x86_64-linux-gnu") if(TIZEN) set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu/9.2.0") @@ -279,7 +281,7 @@ endif() # Specify compile options -if((TARGET_ARCH_NAME MATCHES "^(arm|arm64|armel|armv6|ppc64le|riscv64|s390x)$" AND NOT ANDROID AND NOT FREEBSD) OR ILLUMOS OR HAIKU) +if((TARGET_ARCH_NAME MATCHES "^(arm|arm64|armel|armv6|ppc64le|riscv64|s390x|x64|x86)$" AND NOT ANDROID AND NOT FREEBSD) OR ILLUMOS OR HAIKU) set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN}) set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN}) set(CMAKE_ASM_COMPILER_TARGET ${TOOLCHAIN}) diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets index 8b2e6e69893de..286a5d9606d4e 100644 --- a/eng/liveBuilds.targets +++ b/eng/liveBuilds.targets @@ -25,7 +25,7 @@ $([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'sharedFramework')) $([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'crossgen2')) $([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'ilc-published')) - $([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', '$(BuildArchitecture)', 'ilc')) + $([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', '$(BuildArchitecture)', 'ilc')) $([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'aotsdk')) $([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'build')) diff --git a/eng/native/build-commons.sh b/eng/native/build-commons.sh index a1f8f550cdc8b..905cc125f9286 100755 --- a/eng/native/build-commons.sh +++ b/eng/native/build-commons.sh @@ -473,6 +473,7 @@ while :; do hostarch|-hostarch) if [[ -n "$2" ]]; then __HostArch="$2" + __ExplicitHostArch=1 shift else echo "ERROR: 'hostarch' requires a non-empty option argument" diff --git a/eng/native/tryrun.cmake b/eng/native/tryrun.cmake index 489f709d50683..7ae283d7c1030 100644 --- a/eng/native/tryrun.cmake +++ b/eng/native/tryrun.cmake @@ -12,6 +12,7 @@ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv7-alpine-linux-musleabihf OR EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/s390x-alpine-linux-musl OR EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/ppc64le-alpine-linux-musl OR EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl OR + EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/x86_64-alpine-linux-musl OR EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/riscv64-alpine-linux-musl) set(ALPINE_LINUX 1) @@ -74,7 +75,7 @@ if(DARWIN) else() message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only arm64 or x64 is supported for OSX cross build!") endif() -elseif(TARGET_ARCH_NAME MATCHES "^(armel|arm|armv6|arm64|loongarch64|riscv64|s390x|ppc64le|x86)$" OR FREEBSD OR ILLUMOS OR TIZEN) +elseif(TARGET_ARCH_NAME MATCHES "^(armel|arm|armv6|arm64|loongarch64|riscv64|s390x|ppc64le|x86|x64)$" OR FREEBSD OR ILLUMOS OR TIZEN) set_cache_value(FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL_EXITCODE 1) set_cache_value(GETPWUID_R_SETS_ERRNO_EXITCODE 0) set_cache_value(HAS_POSIX_SEMAPHORES_EXITCODE 0) @@ -160,6 +161,6 @@ else() message(FATAL_ERROR "Unsupported platform. OS: ${CMAKE_SYSTEM_NAME}, arch: ${TARGET_ARCH_NAME}") endif() -if(TARGET_ARCH_NAME MATCHES "^(x86|s390x|armv6|loongarch64|riscv64|ppc64le)$") +if(TARGET_ARCH_NAME MATCHES "^(x86|x64|s390x|armv6|loongarch64|riscv64|ppc64le)$") set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 0) endif() diff --git a/eng/nativepgo.targets b/eng/nativepgo.targets index 9f5984efdb633..cfd41d5e975a8 100644 --- a/eng/nativepgo.targets +++ b/eng/nativepgo.targets @@ -1,7 +1,8 @@ true - true + + false false false diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml index 80c263eea7c6b..6124c13390ee6 100644 --- a/eng/pipelines/common/global-build-job.yml +++ b/eng/pipelines/common/global-build-job.yml @@ -75,9 +75,11 @@ jobs: - name: _osParameter value: /p:RuntimeOS=linux-bionic - # Do not rename as it clashes with MSBuild property in libraries/build-native.proj - - name: _crossBuildPropertyArg - value: /p:CrossBuild=${{ parameters.crossBuild }} + - name: crossArg + value: '' + - ${{ if eq(parameters.crossBuild, true) }}: + - name: crossArg + value: '-cross' - ${{ if ne(parameters.jobParameters.crossrootfsDir, '') }}: # This is only required for cross builds. @@ -187,7 +189,7 @@ jobs: - task: CodeQL3000Init@0 displayName: Initialize CodeQL (manually-injected) - - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) ${{ parameters.buildArgs }} $(_officialBuildParameter) $(_crossBuildPropertyArg) $(_cxx11Parameter) $(_buildDarwinFrameworksParameter) $(_overrideTestScriptWindowsCmdParameter) + - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) $(crossArg) ${{ parameters.buildArgs }} $(_officialBuildParameter) $(_cxx11Parameter) $(_buildDarwinFrameworksParameter) $(_overrideTestScriptWindowsCmdParameter) displayName: Build product ${{ if eq(parameters.useContinueOnErrorDuringBuild, true) }}: continueOnError: ${{ parameters.shouldContinueOnError }} diff --git a/eng/pipelines/common/platform-matrix.yml b/eng/pipelines/common/platform-matrix.yml index 6e7736b584fff..7918cb0d13789 100644 --- a/eng/pipelines/common/platform-matrix.yml +++ b/eng/pipelines/common/platform-matrix.yml @@ -108,6 +108,7 @@ jobs: runtimeFlavor: ${{ parameters.runtimeFlavor }} buildConfig: ${{ parameters.buildConfig }} helixQueueGroup: ${{ parameters.helixQueueGroup }} + crossBuild: true ${{ insert }}: ${{ parameters.jobParameters }} # Linux musl arm @@ -222,6 +223,7 @@ jobs: runtimeFlavor: ${{ parameters.runtimeFlavor }} buildConfig: ${{ parameters.buildConfig }} helixQueueGroup: ${{ parameters.helixQueueGroup }} + crossBuild: true ${{ insert }}: ${{ parameters.jobParameters }} # Linux x86 @@ -316,6 +318,68 @@ jobs: isNonPortableSourceBuild: false ${{ insert }}: ${{ parameters.jobParameters }} +# GCC Linux x64 Build + +- ${{ if containsValue(parameters.platforms, 'gcc_linux_x64') }}: + - template: xplat-setup.yml + parameters: + jobTemplate: ${{ parameters.jobTemplate }} + helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }} + variables: ${{ parameters.variables }} + osGroup: linux + archType: x64 + targetRid: linux-x64 + platform: linux_x64 + shouldContinueOnError: ${{ parameters.shouldContinueOnError }} + container: debian-11-gcc12-amd64 + jobParameters: + runtimeFlavor: ${{ parameters.runtimeFlavor }} + buildConfig: ${{ parameters.buildConfig }} + helixQueueGroup: ${{ parameters.helixQueueGroup }} + compilerName: gcc + ${{ insert }}: ${{ parameters.jobParameters }} + +# Mono Linux arm64 product build + +- ${{ if containsValue(parameters.platforms, 'mono_linux_arm64') }}: + - template: xplat-setup.yml + parameters: + jobTemplate: ${{ parameters.jobTemplate }} + helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }} + variables: ${{ parameters.variables }} + osGroup: linux + archType: arm64 + targetRid: linux-arm64 + platform: linux_arm64 + shouldContinueOnError: ${{ parameters.shouldContinueOnError }} + container: mono_linux_arm64 + jobParameters: + runtimeFlavor: ${{ parameters.runtimeFlavor }} + buildConfig: ${{ parameters.buildConfig }} + helixQueueGroup: ${{ parameters.helixQueueGroup }} + crossBuild: true + ${{ insert }}: ${{ parameters.jobParameters }} + +# Mono LLVMAot test build + +- ${{ if containsValue(parameters.platforms, 'linux_x64_llvmaot') }}: + - template: xplat-setup.yml + parameters: + jobTemplate: ${{ parameters.jobTemplate }} + helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }} + variables: ${{ parameters.variables }} + osGroup: linux + archType: x64 + targetRid: linux-x64 + platform: linux_x64 + shouldContinueOnError: ${{ parameters.shouldContinueOnError }} + container: linux_x64_llvmaot + jobParameters: + runtimeFlavor: ${{ parameters.runtimeFlavor }} + buildConfig: ${{ parameters.buildConfig }} + helixQueueGroup: ${{ parameters.helixQueueGroup }} + ${{ insert }}: ${{ parameters.jobParameters }} + # Linux s390x - ${{ if containsValue(parameters.platforms, 'linux_s390x') }}: diff --git a/eng/pipelines/common/templates/pipeline-with-resources.yml b/eng/pipelines/common/templates/pipeline-with-resources.yml index de16160c88be7..d9222efc1a8dd 100644 --- a/eng/pipelines/common/templates/pipeline-with-resources.yml +++ b/eng/pipelines/common/templates/pipeline-with-resources.yml @@ -5,7 +5,7 @@ parameters: resources: containers: - container: linux_arm - image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm + image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm-20230410173854-290f679 env: ROOTFS_DIR: /crossrootfs/arm @@ -14,21 +14,29 @@ resources: env: ROOTFS_DIR: /crossrootfs/armv6 - - container: linux_arm64 + # Use old build images until we can avoid a clang-12 crash: https://github.com/dotnet/runtime/issues/84503 + - container: mono_linux_arm64 image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-cross-arm64 env: ROOTFS_DIR: /crossrootfs/arm64 + - container: linux_arm64 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64-20230410173854-2288685 + env: + ROOTFS_DIR: /crossrootfs/arm64 + - container: linux_musl_x64 - image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-WithNode + image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-amd64-alpine-20230410173854-2288685 + env: + ROOTFS_DIR: /crossrootfs/x64 - container: linux_musl_arm - image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-cross-arm-alpine + image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm-alpine-20230410173854-290f679 env: ROOTFS_DIR: /crossrootfs/arm - container: linux_musl_arm64 - image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-cross-arm64-alpine + image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64-alpine-20230410173854-2288685 env: ROOTFS_DIR: /crossrootfs/arm64 # This container contains all required toolsets to build for Android and for Linux with bionic libc. @@ -37,10 +45,12 @@ resources: image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-android - container: linux_x64 - image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-amd64-20230410173854-2288685 + env: + ROOTFS_DIR: /crossrootfs/x64 - container: linux_x86 - image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-x86-linux + image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-x86-20230410173854-2288685 env: ROOTFS_DIR: /crossrootfs/x86 @@ -59,6 +69,12 @@ resources: env: ROOTFS_DIR: /crossrootfs/ppc64le + - container: debian-11-gcc12-amd64 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-gcc12-amd64 + + - container: linux_x64_llvmaot + image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7 + - container: browser_wasm image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-webassembly-net8-20230322221728-80fdceb diff --git a/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml b/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml index 651ecdeed5b4f..174832216912b 100644 --- a/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml +++ b/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml @@ -33,7 +33,7 @@ steps: - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} displayName: Build Tests - ${{ if ne(parameters.osGroup, 'windows') }}: - - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci os ${{ parameters.osGroup }} ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} + - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(crossArg) ci os ${{ parameters.osGroup }} ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} displayName: Build Tests diff --git a/eng/pipelines/common/templates/runtimes/build-test-job.yml b/eng/pipelines/common/templates/runtimes/build-test-job.yml index f5f306713fc8e..2813c45915c5e 100644 --- a/eng/pipelines/common/templates/runtimes/build-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/build-test-job.yml @@ -13,6 +13,7 @@ parameters: runtimeVariant: '' dependsOn: [] dependOnEvaluatePaths: false + crossBuild: false pgoType: '' ### Build managed test components (native components are getting built as part @@ -31,16 +32,13 @@ jobs: archType: ${{ parameters.archType }} osGroup: ${{ parameters.osGroup }} osSubgroup: ${{ parameters.osSubgroup }} + crossBuild: ${{ parameters.crossBuild }} container: ${{ parameters.container }} runtimeVariant: ${{ parameters.runtimeVariant }} testGroup: ${{ parameters.testGroup }} pool: ${{ parameters.pool }} dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }} - - ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc'), not(and(eq(parameters.osGroup, 'linux'), eq(parameters.osSubgroup, '_musl'))), not(eq(parameters.osGroup, 'osx'))) }}: - compilerArg: '-clang9' - ${{ if not(and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc'), not(and(eq(parameters.osGroup, 'linux'), eq(parameters.osSubgroup, '_musl'))), not(eq(parameters.osGroup, 'osx')))) }}: - compilerArg: '' + compilerArg: '' # Test jobs should continue on error for internal builds ${{ if eq(variables['System.TeamProject'], 'internal') }}: @@ -74,17 +72,6 @@ jobs: value: 'libs.sfx+libs.oob+clr.iltools /p:RefOnly=true -c Release -ci' - name: compilerArg value: '' - - ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc')) }}: - - name: compilerArg - value: '-clang9' - # We need to use the stable version available on Alpine Linux - - ${{ if and(eq(parameters.osGroup, 'linux'), eq(parameters.osSubgroup, '_musl')) }}: - - name: compilerArg - value: '' - # AppleClang has different version scheme, so we let compiler introspection pick up the available clang from PATH - - ${{ if eq(parameters.osGroup, 'osx') }}: - - name: compilerArg - value: '' - name: runtimeFlavorArgs value: '' @@ -109,7 +96,7 @@ jobs: displayName: Install native dependencies # Build core/libraries dependencies of test build - - script: $(Build.SourcesDirectory)/build$(scriptExt) $(liveRuntimeBuildParams) $(compilerArg) + - script: $(Build.SourcesDirectory)/build$(scriptExt) $(liveRuntimeBuildParams) $(crossArg) $(compilerArg) displayName: Build coreclr/libs components needed by test build - ${{ if in(parameters.osGroup, 'osx', 'ios', 'tvos') }}: diff --git a/eng/pipelines/coreclr/nativeaot-post-build-steps.yml b/eng/pipelines/coreclr/nativeaot-post-build-steps.yml index c971d239edc9e..491e663230fcb 100644 --- a/eng/pipelines/coreclr/nativeaot-post-build-steps.yml +++ b/eng/pipelines/coreclr/nativeaot-post-build-steps.yml @@ -27,5 +27,5 @@ steps: # Publishing tooling doesn't support different configs between runtime and libs, so only run tests in Release config - ${{ if eq(parameters.buildConfig, 'release') }}: - - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) -s libs.tests -c $(_BuildConfig) /p:TestAssemblies=false /p:RunNativeAotTestApps=true $(_officialBuildParameter) $(_crossBuildPropertyArg) /bl:$(Build.SourcesDirectory)/artifacts/log/$(buildConfigUpper)/NativeAotTests.binlog ${{ parameters.extraTestArgs }} + - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) -s libs.tests -c $(_BuildConfig) $(crossArg) /p:TestAssemblies=false /p:RunNativeAotTestApps=true $(_officialBuildParameter) /bl:$(Build.SourcesDirectory)/artifacts/log/$(buildConfigUpper)/NativeAotTests.binlog ${{ parameters.extraTestArgs }} displayName: Run NativeAot Library Tests diff --git a/eng/pipelines/coreclr/templates/build-jit-job.yml b/eng/pipelines/coreclr/templates/build-jit-job.yml index 8aeaa489f9b1d..1c4e454187622 100644 --- a/eng/pipelines/coreclr/templates/build-jit-job.yml +++ b/eng/pipelines/coreclr/templates/build-jit-job.yml @@ -53,17 +53,6 @@ jobs: - name: compilerArg value: '' - - ${{ if ne(parameters.osGroup, 'windows') }}: - - name: compilerArg - value: '-clang9' - # We need to use the stable version available on Alpine Linux - - ${{ if and(eq(parameters.osGroup, 'linux'), eq(parameters.osSubgroup, '_musl')) }}: - - name: compilerArg - value: '' - # AppleClang has different version scheme, so we let compiler introspection pick up the available clang from PATH - - ${{ if eq(parameters.osGroup, 'osx') }}: - - name: compilerArg - value: '' - ${{ if eq(parameters.osGroup, 'windows') }}: - name: PythonScript diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index a7f68e3422055..e2e1e731c5fea 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -86,17 +86,6 @@ jobs: value: '-gcc' - name: publishLogsArtifactPrefix value: 'BuildLogs_CoreCLR_GCC' - - ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc')) }}: - - name: compilerArg - value: '-clang9' - # We need to use the stable version available on Alpine Linux - - ${{ if and(eq(parameters.osGroup, 'linux'), eq(parameters.osSubgroup, '_musl')) }}: - - name: compilerArg - value: '' - # AppleClang has different version scheme, so we let compiler introspection pick up the available clang from PATH - - ${{ if eq(parameters.osGroup, 'osx') }}: - - name: compilerArg - value: '' - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}: # Variables used to publish packages to blob feed - name: dotnetfeedUrl @@ -207,7 +196,7 @@ jobs: - script: $(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) -ci $(enforcePgoArg) $(pgoInstrumentArg) $(officialBuildIdArg) $(clrInterpreterBuildArg) $(CoreClrPgoDataArg) displayName: Build CoreCLR Runtime - - ${{ if ne(parameters.archType, 'x64') }}: + - ${{ if or(eq(parameters.crossBuild, 'true'), ne(parameters.archType, 'x64')) }}: - script: $(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) -hostarch x64 $(osArg) -ci $(compilerArg) -component crosscomponents -cmakeargs "-DCLR_CROSS_COMPONENTS_BUILD=1" $(officialBuildIdArg) $(clrRuntimePortableBuildArg) displayName: Build CoreCLR Cross-Arch Tools (Tools that run on x64 targeting x86) @@ -223,7 +212,7 @@ jobs: # Build CoreCLR Managed Components - ${{ if or(ne(parameters.osGroup, 'linux'), ne(parameters.archType, 'x86')) }}: - - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.corelib+clr.nativecorelib+clr.nativeaotlibs+clr.tools+clr.packages+clr.paltestlist $(crossArg) -arch $(archType) $(osArg) -c $(buildConfig) $(pgoInstrumentArg) $(officialBuildIdArg) -ci + - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.corelib+clr.nativecorelib+clr.nativeaotlibs+clr.tools+clr.packages+clr.paltestlist $(crossArg) $(compilerArg) -arch $(archType) $(osArg) -c $(buildConfig) $(pgoInstrumentArg) $(officialBuildIdArg) -ci displayName: Build managed product components and packages - ${{ if and(eq(parameters.osGroup, 'linux'), eq(parameters.archType, 'x86')) }}: - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.corelib $(crossArg) -arch $(archType) $(osArg) -c $(buildConfig) $(pgoInstrumentArg) $(officialBuildIdArg) -ci diff --git a/eng/pipelines/libraries/execute-trimming-tests-steps.yml b/eng/pipelines/libraries/execute-trimming-tests-steps.yml index a0172e2363428..567abab0bb984 100644 --- a/eng/pipelines/libraries/execute-trimming-tests-steps.yml +++ b/eng/pipelines/libraries/execute-trimming-tests-steps.yml @@ -4,5 +4,5 @@ parameters: steps: # Execute tests - - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) -s libs.tests -c $(_BuildConfig) /p:TestAssemblies=false /p:TestTrimming=true $(_officialBuildParameter) $(_crossBuildPropertyArg) /bl:$(Build.SourcesDirectory)/artifacts/log/$(buildConfigUpper)/TrimmingTests.binlog ${{ parameters.extraTestArgs }} + - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) -s libs.tests -c $(_BuildConfig) $(crossArg) /p:TestAssemblies=false /p:TestTrimming=true $(_officialBuildParameter) /bl:$(Build.SourcesDirectory)/artifacts/log/$(buildConfigUpper)/TrimmingTests.binlog ${{ parameters.extraTestArgs }} displayName: Run Trimming Tests diff --git a/eng/pipelines/mono/templates/build-job.yml b/eng/pipelines/mono/templates/build-job.yml index ddce3b6f0070c..cdcf76143f5fd 100644 --- a/eng/pipelines/mono/templates/build-job.yml +++ b/eng/pipelines/mono/templates/build-job.yml @@ -145,7 +145,7 @@ jobs: # Build - ${{ if ne(parameters.osGroup, 'windows') }}: - - script: ./build$(scriptExt) -subset mono$(msCorDbi)+clr.hosts -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter) $(darwinFrameworks) + - script: ./build$(scriptExt) -subset mono$(msCorDbi)+clr.hosts $(crossArg) -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter) $(darwinFrameworks) displayName: Build product - ${{ if eq(parameters.osGroup, 'windows') }}: - script: build$(scriptExt) -subset mono$(msCorDbi)+clr.hosts -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter) @@ -170,7 +170,7 @@ jobs: # Build packages - ${{ if ne(parameters.osGroup, 'windows') }}: - - script: ./build$(scriptExt) -subset mono$(msCorDbi)+clr.hosts -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter) -pack $(OutputRidArg) + - script: ./build$(scriptExt) -subset mono$(msCorDbi)+clr.hosts $(crossArg) -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter) -pack $(OutputRidArg) displayName: Build nupkg - ${{ if eq(parameters.osGroup, 'windows') }}: - script: build$(scriptExt) -subset mono$(msCorDbi)+clr.hosts -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter) -pack $(OutputRidArg) diff --git a/eng/pipelines/mono/templates/xplat-pipeline-job.yml b/eng/pipelines/mono/templates/xplat-pipeline-job.yml index addebb94903f0..2c369f71f30bb 100644 --- a/eng/pipelines/mono/templates/xplat-pipeline-job.yml +++ b/eng/pipelines/mono/templates/xplat-pipeline-job.yml @@ -6,6 +6,7 @@ parameters: name: '' helixType: '(unspecified)' container: '' + crossBuild: false liveLibrariesBuildConfig: '' strategy: '' pool: '' @@ -34,6 +35,7 @@ jobs: name: ${{ parameters.name }} helixType: ${{ parameters.helixType }} container: ${{ parameters.container }} + crossBuild: ${{ parameters.crossBuild }} strategy: ${{ parameters.strategy }} pool: ${{ parameters.pool }} runtimeVariant: ${{ parameters.runtimeVariant }} diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index c3903d3728b89..dfb06547eeb8a 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -100,11 +100,9 @@ extends: jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml buildConfig: checked platforms: - - linux_x64 - container: debian-11-gcc12-amd64 + - gcc_linux_x64 jobParameters: testGroup: innerloop - compilerName: gcc condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), @@ -703,7 +701,9 @@ extends: - osx_x64 - osx_arm64 - linux_x64 - - linux_arm64 + # - linux_arm64 + # Remove once we can use linux_arm64: https://github.com/dotnet/runtime/issues/84503 + - mono_linux_arm64 # - linux_musl_arm64 - windows_x64 - windows_x86 @@ -1212,7 +1212,7 @@ extends: buildConfig: Release runtimeFlavor: mono platforms: - - linux_x64 + - linux_x64_llvmaot # Disabled pending outcome of https://github.com/dotnet/runtime/issues/60234 investigation #- linux_arm64 variables: diff --git a/eng/testing/linker/project.csproj.template b/eng/testing/linker/project.csproj.template index fe3d1ba28871e..6dcd1c5754dd9 100644 --- a/eng/testing/linker/project.csproj.template +++ b/eng/testing/linker/project.csproj.template @@ -36,9 +36,15 @@ {IlcSdkPath} {IlcFrameworkPath} {IlcFrameworkNativePath} + lld + $(ROOTFS_DIR) {CoreCLRBuildIntegrationDir} + + + + {RuntimeHostConfigurationOptions} diff --git a/eng/testing/tests.singlefile.targets b/eng/testing/tests.singlefile.targets index 1ea8c014446c6..821e8f93750b4 100644 --- a/eng/testing/tests.singlefile.targets +++ b/eng/testing/tests.singlefile.targets @@ -24,11 +24,12 @@ $(CoreCLRILCompilerDir) $(CoreCLRCrossILCompilerDir) - $(ROOTFS_DIR) + $(ROOTFS_DIR) $(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll $(CoreCLRAotSdkDir) $(NetCoreAppCurrentTestHostSharedFrameworkPath) $(NetCoreAppCurrentTestHostSharedFrameworkPath) + lld $(NoWarn);IL1005;IL2105;IL3000;IL3001;IL3002;IL3003 partial true diff --git a/src/coreclr/CMakeLists.txt b/src/coreclr/CMakeLists.txt index 67b773bf78787..d794641ebcd78 100644 --- a/src/coreclr/CMakeLists.txt +++ b/src/coreclr/CMakeLists.txt @@ -109,6 +109,10 @@ if(CLR_CMAKE_HOST_UNIX) endif() endif() + if(CLR_CMAKE_TARGET_LINUX AND CLR_CMAKE_TARGET_ARCH_I386) + add_linker_flag(-Wl,-z,notext) + endif() + if(NOT CLR_CMAKE_HOST_MACCATALYST AND NOT CLR_CMAKE_HOST_IOS AND NOT CLR_CMAKE_HOST_TVOS) add_subdirectory(pal) add_subdirectory(hosts) diff --git a/src/coreclr/build-runtime.sh b/src/coreclr/build-runtime.sh index 7399088f291d9..2b99c9b9eed5f 100755 --- a/src/coreclr/build-runtime.sh +++ b/src/coreclr/build-runtime.sh @@ -114,7 +114,7 @@ __IntermediatesDir="$__ArtifactsIntermediatesDir/$__ConfigTriplet" export __IntermediatesDir __ArtifactsIntermediatesDir -if [[ "$__TargetArch" != "$__HostArch" ]]; then +if [[ "$__ExplicitHostArch" == 1 ]]; then __IntermediatesDir="$__IntermediatesDir/$__HostArch" __BinDir="$__BinDir/$__HostArch" fi diff --git a/src/coreclr/crossgen-corelib.proj b/src/coreclr/crossgen-corelib.proj index 553eee0b38d37..7c3ac1e3e4723 100644 --- a/src/coreclr/crossgen-corelib.proj +++ b/src/coreclr/crossgen-corelib.proj @@ -13,15 +13,9 @@ - - - x64 - $(BuildArchitecture) - + $(BuildArchitecture) - true - false false true diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets index 5b62b6f8906f0..44703efeb45cd 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets @@ -318,8 +318,7 @@ The .NET Foundation licenses this file to you under the MIT license. - - + @@ -336,9 +335,6 @@ The .NET Foundation licenses this file to you under the MIT license. -x - - - diff --git a/src/coreclr/pgosupport.cmake b/src/coreclr/pgosupport.cmake index 71d90b49e9419..edcffea53954f 100644 --- a/src/coreclr/pgosupport.cmake +++ b/src/coreclr/pgosupport.cmake @@ -6,7 +6,7 @@ if(NOT WIN32) # Function required to give CMAKE_REQUIRED_* local scope function(check_have_lto) set(CMAKE_REQUIRED_FLAGS -flto) - set(CMAKE_REQUIRED_LIBRARIES -flto -fuse-ld=gold) + set(CMAKE_REQUIRED_LIBRARIES -flto) check_cxx_source_compiles("int main() { return 0; }" HAVE_LTO) endfunction(check_have_lto) check_have_lto() diff --git a/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj b/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj index db48433db73f8..7ffc15676e525 100644 --- a/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj +++ b/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj @@ -13,11 +13,68 @@ false false true + $(ROOTFS_DIR) true true true + + + + <_hostOS>$(NETCoreSdkPortableRuntimeIdentifier.SubString(0, $(NETCoreSdkPortableRuntimeIdentifier.LastIndexOf('-')))) + $(_hostOS) + runtime.$(OSIdentifier)-$(IlcHostArch).Microsoft.DotNet.ILCompiler + + + + + + + + $(RuntimeIdentifier) + + + x86_64 + aarch64 + arm64 + + + $(CrossCompileArch)-linux-gnu + $(CrossCompileArch)-alpine-linux-musl + $(CrossCompileArch)-unknown-freebsd12 + + + + + + + + + + clang + + true + + + + + + + + + + + $(CoreCLRILCompilerDir) - $(CoreCLRCrossILCompilerDir) - $(ROOTFS_DIR) + $(CoreCLRCrossILCompilerDir) + $(ROOTFS_DIR) $(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll $(CoreCLRAotSdkDir) $(MicrosoftNetCoreAppRuntimePackRidLibTfmDir) @@ -39,6 +39,10 @@ false + + + + @@ -57,11 +61,36 @@ + + + + + $(RuntimeIdentifier) + + + x86_64 + aarch64 + arm64 + + + $(CrossCompileArch)-linux-gnu + $(CrossCompileArch)-alpine-linux-musl + $(CrossCompileArch)-unknown-freebsd12 + + + + + + + clang + lld true false - + false false - llvm-objcopy-15 - aarch64-linux-gnu-objcopy + Condition="'$(TargetOS)' == '$(HostOS)' and '$(TargetArchitecture)' == '$(BuildArchitecture)' and '$(CrossBuild)' != 'true'"> diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/ReadyToRun.targets b/src/installer/pkg/sfx/Microsoft.NETCore.App/ReadyToRun.targets index d29f12364fe24..0b82891e6c42e 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/ReadyToRun.targets +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/ReadyToRun.targets @@ -15,7 +15,7 @@ - x64 + $(BuildArchitecture) $(CoreCLRArtifactsPath)\$(CrossDir)\crossgen2\crossgen2.dll true diff --git a/src/mono/CMakeLists.txt b/src/mono/CMakeLists.txt index 7b57776aa007c..d9202a9cf196e 100644 --- a/src/mono/CMakeLists.txt +++ b/src/mono/CMakeLists.txt @@ -712,7 +712,7 @@ elseif(HOST_ANDROID) elseif(HOST_LINUX) include(FindPkgConfig) if(CROSS_ROOTFS) - set(ENV{PKG_CONFIG_ICU_UC_INCLUDEDIR} "${CROSS_ROOTFS}/usr/include") + set(ENV{PKG_CONFIG_SYSROOT_DIR} "${CROSS_ROOTFS}") endif(CROSS_ROOTFS) pkg_check_modules(ICU icu-uc) set(ICU_FLAGS "-DTARGET_UNIX -DU_DISABLE_RENAMING -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option -Wno-deprecated-declarations") diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 8e6d21c440d39..ec4168167b283 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -105,7 +105,7 @@ - + @@ -314,6 +314,20 @@ <_MonoBuildEnv Include="PKG_CONFIG_PATH=$(MonoCrossDir)/lib/pkgconfig" /> + + + <_MonoCMakeArgs Include="-DCMAKE_TOOLCHAIN_FILE=$(CrossToolchainFile)" /> + <_MonoBuildEnv Include="TARGET_BUILD_ARCH=x64" /> + <_MonoBuildEnv Include="PKG_CONFIG_PATH=$(MonoCrossDir)/usr/lib/pkgconfig" /> + + + + + <_MonoCMakeArgs Include="-DCMAKE_TOOLCHAIN_FILE=$(CrossToolchainFile)" /> + <_MonoBuildEnv Include="TARGET_BUILD_ARCH=x86" /> + <_MonoBuildEnv Include="PKG_CONFIG_PATH=$(MonoCrossDir)/usr/lib/pkgconfig" /> + + <_MonoCMakeArgs Include="-DCMAKE_TOOLCHAIN_FILE=$(CrossToolchainFile)" /> @@ -546,11 +560,15 @@ <_MonoCFLAGS Include="-Wl,--build-id=sha1" /> + <_MonoCFLAGS Condition="'$(Platform)' == 'arm'" Include="-march=armv7-a" /> <_MonoCXXFLAGS Include="-Wl,--build-id=sha1" /> + <_MonoCXXFLAGS Condition="'$(Platform)' == 'arm'" Include="-march=armv7-a" /> <_MonoAOTCFLAGS Include="-Wl,--build-id=sha1" /> + <_MonoAOTCFLAGS Condition="'$(RealTargetArchitecture)' == 'arm'" Include="-march=armv7-a" /> <_MonoAOTCXXFLAGS Include="-Wl,--build-id=sha1" /> + <_MonoAOTCXXFLAGS Condition="'$(RealTargetArchitecture)' == 'arm'" Include="-march=armv7-a" /> @@ -659,7 +677,13 @@ <_ObjcopyPrefix Condition="'$(MonoCrossDir)' != '' and '$(Platform)' == 'riscv64' and $(_Objcopy) == ''">llvm-objcopy- - + + + + + <_Objcopy Condition="'$(_ObjcopyFound)' == '0'">llvm-objcopy + + @@ -818,6 +842,13 @@ + + + + <_MonoAotBuildEnv Include="TARGET_BUILD_ARCH=x64" /> + <_MonoAotBuildEnv Include="PKG_CONFIG_PATH=$(MonoCrossDir)/usr/lib/x86_64-linux-gnu/pkgconfig" /> + + @@ -856,6 +887,7 @@ <_MonoSkipInitCompiler Condition="'$(RealTargetArchitecture)' != '' and '$(RealTargetArchitecture)' != '$(BuildArchitecture)'">false + <_MonoSkipInitCompiler Condition="'$(CrossBuild)' == 'true'">false <_MonoAotCrossOffsetsCommand Condition="'$(MonoUseCrossTool)' == 'true'">$(PythonCmd) $(MonoProjectRoot)mono/tools/offsets-tool/offsets-tool.py @(MonoAotCrossOffsetsToolParams, ' ') <_MonoAotCMakeConfigureCommand>cmake @(MonoAOTCMakeArgs, ' ') $(MonoCMakeExtraArgs) "$(MonoProjectRoot.TrimEnd('\/'))" <_MonoAotCMakeConfigureCommand Condition="'$(_MonoSkipInitCompiler)' != 'true' and '$(HostOS)' != 'windows'">sh -c 'build_arch="$(_CompilerTargetArch)" compiler="$(MonoCCompiler)" . "$(RepositoryEngineeringCommonDir)native/init-compiler.sh" && @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand)' diff --git a/src/native/libs/System.Globalization.Native/CMakeLists.txt b/src/native/libs/System.Globalization.Native/CMakeLists.txt index a895bb2275528..1614fa62b22e6 100644 --- a/src/native/libs/System.Globalization.Native/CMakeLists.txt +++ b/src/native/libs/System.Globalization.Native/CMakeLists.txt @@ -124,7 +124,7 @@ endif() install (TARGETS System.Globalization.Native-Static DESTINATION ${STATIC_LIB_DESTINATION} COMPONENT libs) -if(NOT CLR_CMAKE_TARGET_APPLE AND NOT CLR_CMAKE_TARGET_ANDROID) +if(NOT CLR_CMAKE_TARGET_APPLE AND NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_TARGET_ALPINE_LINUX) if (GEN_SHARED_LIB) add_custom_command(TARGET System.Globalization.Native POST_BUILD COMMENT "Verifying System.Globalization.Native.so dependencies" diff --git a/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt b/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt index 1b066e554ffe3..8eb0b88258ed6 100644 --- a/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt +++ b/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt @@ -98,12 +98,12 @@ set_target_properties(System.Security.Cryptography.Native.OpenSsl-Static PROPERT if (GEN_SHARED_LIB) if (FEATURE_DISTRO_AGNOSTIC_SSL) - # on macOS the link step fails with undefined symbols, and the script doesn't run. + # on macOS and Alpine the link step fails with undefined symbols, and the script doesn't run. # if the build succeeds, the script would succeed, except it uses a Linux-only command. # # on Linux, the build will succeed with undefined symbols, then the script reports them # and fails the build for us. - if (NOT APPLE) + if (NOT APPLE AND NOT CLR_CMAKE_TARGET_ALPINE_LINUX) add_custom_command(TARGET System.Security.Cryptography.Native.OpenSsl POST_BUILD COMMENT "Verifying System.Security.Cryptography.Native.OpenSsl.so dependencies" COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../verify-so.sh diff --git a/src/tests/Directory.Build.targets b/src/tests/Directory.Build.targets index 7773f30703d56..cbeda81910e99 100644 --- a/src/tests/Directory.Build.targets +++ b/src/tests/Directory.Build.targets @@ -533,12 +533,15 @@ $(MicrosoftNetCoreAppRuntimePackNativeDir) $(OutputRid) + lld + $(ROOTFS_DIR) true true $(IlcSdkPath) + diff --git a/src/tests/build.proj b/src/tests/build.proj index 597ec67d803da..8a00ffa945fe0 100644 --- a/src/tests/build.proj +++ b/src/tests/build.proj @@ -486,6 +486,7 @@ $(GroupBuildCmd) /nodeReuse:false $(GroupBuildCmd) /maxcpucount $(GroupBuildCmd) /bl:$(ArtifactsDir)/log/$(Configuration)/InnerManagedTestBuild.$(__TestGroupToBuild).binlog + $(GroupBuildCmd) "/p:CrossBuild=true" $(GroupBuildCmd) "/p:DefaultBuildAllTarget=BuildNativeAot" $(GroupBuildCmd) "/p:IlcMultiModule=true" $(GroupBuildCmd) "/p:BuildNativeAotFrameworkObjects=true" diff --git a/src/tests/nativeaot/SmokeTests/DwarfDump/Program.cs b/src/tests/nativeaot/SmokeTests/DwarfDump/Program.cs index f0996dd070ea5..0096a28c92f1e 100644 --- a/src/tests/nativeaot/SmokeTests/DwarfDump/Program.cs +++ b/src/tests/nativeaot/SmokeTests/DwarfDump/Program.cs @@ -51,11 +51,11 @@ public static int Main(string[] args) // Just count the number of warnings and errors. There are so many right now that it's not worth enumerating the list #if DEBUG - const int MinWarnings = 17000; + const int MinWarnings = 16500; const int MaxWarnings = 18500; #else - const int MinWarnings = 12000; - const int MaxWarnings = 13000; + const int MinWarnings = 9500; + const int MaxWarnings = 10500; #endif int count = 0; string line; diff --git a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/Program.cs b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/Program.cs index 2cc750f188c91..06f6a027c94dd 100644 --- a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/Program.cs +++ b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/Program.cs @@ -30,12 +30,12 @@ static int Main() else { lowerBound = 1300 * 1024; // ~1.3 MB - upperBound = 1600 * 1024; // ~1.6 MB + upperBound = 1750 * 1024; // ~1.75 MB } if (fileSize < lowerBound || fileSize > upperBound) { - Console.WriteLine("BUG: File size is not in the expected range. Did a libraries change regress size of Hello World?"); + Console.WriteLine($"BUG: File size is not in the expected range ({lowerBound} to {upperBound} bytes). Did a libraries change regress size of Hello World?"); return 1; } diff --git a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Baseline.csproj b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Baseline.csproj index 28fc56a41439c..51ef171354bef 100644 --- a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Baseline.csproj +++ b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/X64Baseline.csproj @@ -7,9 +7,6 @@ true $(DefineConstants);BASELINE_INTRINSICS true - - - objcopy diff --git a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/x64NonVex.csproj b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/x64NonVex.csproj index c00af0ea752e4..86c1e23e9dfa5 100644 --- a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/x64NonVex.csproj +++ b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/x64NonVex.csproj @@ -7,9 +7,6 @@ true $(DefineConstants);NON_VEX_INTRINSICS true - - - objcopy diff --git a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/x64Vex.csproj b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/x64Vex.csproj index 92ad863899305..d485e9dae32cc 100644 --- a/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/x64Vex.csproj +++ b/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/x64Vex.csproj @@ -7,9 +7,6 @@ true $(DefineConstants);VEX_INTRINSICS true - - - objcopy