Skip to content

Port runtime's native build infra #2638

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
573 changes: 48 additions & 525 deletions CMakeLists.txt

Large diffs are not rendered by default.

161 changes: 0 additions & 161 deletions compileoptions.cmake

This file was deleted.

27 changes: 0 additions & 27 deletions crossgen.cmake

This file was deleted.

9 changes: 5 additions & 4 deletions diagnostics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ stages:
parameters:
name: Alpine3_13
osGroup: Linux
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-WithNode-20210728123842-ddfc481
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-WithNode-20210910135845-c401c85
artifactsTargetPath: bin/Linux-musl.x64.Release
requiresCapPtraceContainer: true
strategy:
Expand Down Expand Up @@ -175,6 +175,7 @@ stages:
parameters:
name: MacOS_cross
osGroup: MacOS_cross
crossbuild: true
buildAndSkipTest: true
strategy:
matrix:
Expand All @@ -192,7 +193,7 @@ stages:
parameters:
name: Linux_cross
osGroup: Linux
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-14.04-cross-1735d26-20190521133857
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-20210719121212-8a8d3be
crossrootfsDir: '/crossrootfs/arm'
buildAndSkipTest: true
strategy:
Expand All @@ -206,7 +207,7 @@ stages:
parameters:
name: Linux_cross64
osGroup: Linux
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-a3ae44b-20180315221921
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-20210719121212-8a8d3be
crossrootfsDir: '/crossrootfs/arm64'
buildAndSkipTest: true
strategy:
Expand All @@ -220,7 +221,7 @@ stages:
parameters:
name: Alpine_cross64
osGroup: Linux
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-alpine-20210719121212-b2c2436
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-alpine-20210923140502-78f7860
crossrootfsDir: '/crossrootfs/arm64'
artifactsTargetPath: bin/Linux-musl.arm64.Release
buildAndSkipTest: true
Expand Down
12 changes: 4 additions & 8 deletions eng/Build-Native.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ echo %__MsgPrefix%Starting Build at %TIME%
set __ThisScriptFull="%~f0"
set __ThisScriptDir="%~dp0"

call "%__ThisScriptDir%"\setup-vs-tools.cmd
call "%__ThisScriptDir%"\native\init-vs-env.cmd
if NOT '%ERRORLEVEL%' == '0' goto ExitWithError

if defined VS160COMNTOOLS (
Expand Down Expand Up @@ -192,7 +192,7 @@ if /i %__BuildCrossArch% EQU 1 (
set __ExtraCmakeArgs="-DCLR_MANAGED_BINARY_DIR=!__ManagedBinaryDir!" "-DCLR_BUILD_TYPE=%__BuildType%" "-DCLR_CMAKE_TARGET_ARCH=%__BuildArch%" "-DCMAKE_SYSTEM_VERSION=10.0" "-DNUGET_PACKAGES=%NUGET_PACKAGES:\=/%"

pushd "%__CrossCompIntermediatesDir%"
call "%__ProjectDir%\eng\gen-buildsys-win.bat" "%__ProjectDir%" %__VSVersion% %__CrossArch% !__ExtraCmakeArgs!
call "%__ProjectDir%\eng\native\gen-buildsys.cmd" "%__ProjectDir%" "%__CrossCompIntermediatesDir%" %__VSVersion% %__CrossArch% !__ExtraCmakeArgs!
@if defined _echo @echo on
popd

Expand Down Expand Up @@ -235,13 +235,9 @@ if %__Build% EQU 1 (
if /i "%__BuildArch%" == "x86" ( set __VCBuildArch=x86 )
if /i "%__BuildArch%" == "arm" (
set __VCBuildArch=x86_arm
:: Make CMake pick the highest installed version in the 10.0.* range
set ___SDKVersion="-DCMAKE_SYSTEM_VERSION=10.0"
)
if /i "%__BuildArch%" == "arm64" (
set __VCBuildArch=x86_arm64
:: Make CMake pick the highest installed version in the 10.0.* range
set ___SDKVersion="-DCMAKE_SYSTEM_VERSION=10.0"
)

echo %__MsgPrefix%Using environment: "%__VCToolsRoot%\vcvarsall.bat" !__VCBuildArch!
Expand All @@ -266,10 +262,10 @@ if %__Build% EQU 1 (

set "__ManagedBinaryDir=%__RootBinDir%\bin"
set "__ManagedBinaryDir=!__ManagedBinaryDir:\=/!"
set __ExtraCmakeArgs=!___SDKVersion! "-DCLR_MANAGED_BINARY_DIR=!__ManagedBinaryDir!" "-DCLR_BUILD_TYPE=%__BuildType%" "-DCLR_CMAKE_TARGET_ARCH=%__BuildArch%" "-DNUGET_PACKAGES=%NUGET_PACKAGES:\=/%"
set __ExtraCmakeArgs="-DCMAKE_SYSTEM_VERSION=10.0" "-DCLR_MANAGED_BINARY_DIR=!__ManagedBinaryDir!" "-DCLR_BUILD_TYPE=%__BuildType%" "-DCLR_CMAKE_TARGET_ARCH=%__BuildArch%" "-DNUGET_PACKAGES=%NUGET_PACKAGES:\=/%"

pushd "%__IntermediatesDir%"
call "%__ProjectDir%\eng\gen-buildsys-win.bat" "%__ProjectDir%" %__VSVersion% %__BuildArch% !__ExtraCmakeArgs!
call "%__ProjectDir%\eng\native\gen-buildsys.cmd" "%__ProjectDir%" "%__IntermediatesDir%" %__VSVersion% %__BuildArch% !__ExtraCmakeArgs!
@if defined _echo @echo on
popd

Expand Down
Loading