diff --git a/.gitignore b/.gitignore index 06702eab0376..caafe5a8ef06 100644 --- a/.gitignore +++ b/.gitignore @@ -321,6 +321,6 @@ sandbox linker # Arcade files -/artifacts/toolset +/artifacts /.packages /.dotnet diff --git a/CMakeLists.txt b/CMakeLists.txt index 20e1577a912f..bc493c85613e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -208,7 +208,7 @@ include(clrdefinitions.cmake) #------------------------------------- # Include the basic prebuilt headers - required for getting fileversion resource details. include_directories("src/pal/prebuilt/inc") -include_directories("artifacts/bin/obj") +include_directories("artifacts/obj") if(FEATURE_STANDALONE_GC) add_definitions(-DFEATURE_STANDALONE_GC) @@ -221,10 +221,6 @@ if (CLR_CMAKE_PLATFORM_UNIX) include_directories("src/pal/src/safecrt") endif (CLR_CMAKE_PLATFORM_UNIX) -# Microsoft.Dotnet.BuildTools.Coreclr version -set(BuildToolsVersion "1.0.4-prerelease") -set(BuildToolsDir "${CLR_CMAKE_PACKAGES_DIR}/Microsoft.DotNet.BuildTools.CoreCLR/${BuildToolsVersion}") - #------------------------------ # Add Product Directory #------------------------------ diff --git a/Directory.Build.props b/Directory.Build.props index 6dc7c80c2583..4aefe0b4cd89 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -19,8 +19,8 @@ - $(MSBuildThisFileDirectory)/artifacts/Product/$(BuildOS)/ - $(RootArtifactsDir)obj/$(BuildOS)/$(BuildArch)/$(BuildType)/$(MSBuildProjectName)/ + $(MSBuildThisFileDirectory)/artifacts/Product/$(BuildOS)/ + $(RootArtifactsDir)/obj/$(BuildOS)/$(BuildArch)/$(BuildType)/$(MSBuildProjectName)/ false $(MSBuildThisFileDirectory)artifacts\toolset\Common\ @@ -92,7 +92,7 @@ - $(RootArtifactsDir)obj/$(BuildOS)/$(BuildArch)/$(BuildType)/$(MSBuildProjectName)/ + $(RootArtifactsDir)/obj/$(BuildOS)/$(BuildArch)/$(BuildType)/$(MSBuildProjectName)/ $(BinDir) diff --git a/build-packages.cmd b/build-packages.cmd index 1fa93ebda7c9..42ea47a27b77 100644 --- a/build-packages.cmd +++ b/build-packages.cmd @@ -40,7 +40,6 @@ if NOT '%ERRORLEVEL%' == '0' exit /b 1 call %__ProjectDir%/dotnet.cmd msbuild /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^ /p:__BuildOS=Windows_NT /flp:v=detailed;Append;LogFile=build-packages.log^ - /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log^ /p:PortableBuild=true %__ProjectDir%\src\.nuget\packages.builds^ /p:FilterToOSGroup=Windows_NT %__MSBuildArgs% %unprocessedArgs% if NOT [!ERRORLEVEL!]==[0] ( diff --git a/build-packages.sh b/build-packages.sh index 8dfab68bafdc..267b4af6cbaf 100755 --- a/build-packages.sh +++ b/build-packages.sh @@ -127,7 +127,6 @@ fi $__ProjectRoot/dotnet.sh msbuild /nologo /verbosity:minimal /clp:Summary \ /p:__BuildOS=$__BuildOS /flp:v=detailed\;Append\;LogFile=build-packages.log \ - /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll\;LogFile=binclash.log \ /p:PortableBuild=true src/.nuget/packages.builds \ /p:__DistroRid=$__DistroRid /p:BuildNugetPackage=false \ $buildArgs $unprocessedBuildArgs diff --git a/build.cmd b/build.cmd index 67361e00d059..b893353e363a 100644 --- a/build.cmd +++ b/build.cmd @@ -28,19 +28,8 @@ if defined VS160COMNTOOLS ( :: out the variables that might be too large. set ghprbCommentBody= -:: Note that the msbuild project files (specifically, dir.proj) will use the following variables, if set: -:: __BuildArch -- default: x64 -:: __BuildType -- default: Debug -:: __BuildOS -- default: Windows_NT -:: __ProjectDir -- default: directory of the Directory.Build.Props file -:: __SourceDir -- default: %__ProjectDir%\src\ -:: __PackagesDir -- default: %__ProjectDir%\packages\ -:: __RootBinDir -- default: %__ProjectDir%\bin\ -:: __BinDir -- default: %__RootBinDir%\%__BuildOS%.%__BuildArch.%__BuildType%\ -:: __IntermediatesDir -:: __PackagesBinDir -- default: %__BinDir%\.nuget -:: __TestWorkingDir -- default: %__RootBinDir%\tests\%__BuildOS%.%__BuildArch.%__BuildType%\ -:: +:: Note that the msbuild project files (specifically, dir.proj) will use the variables such as +:: __BuildArch, __ProjectDir, etc if set. :: Thus, these variables are not simply internal to this script! :: Set the default arguments for build @@ -50,14 +39,15 @@ set __BuildOS=Windows_NT :: Set the various build properties here so that CMake and MSBuild can pick them up set "__ProjectDir=%~dp0" +set ArcadeBuild=true :: remove trailing slash if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%" set "__ProjectFilesDir=%__ProjectDir%" set "__SourceDir=%__ProjectDir%\src" set "__PackagesDir=%DotNetRestorePackagesPath%" if [%__PackagesDir%]==[] set "__PackagesDir=%__ProjectDir%\packages" -set "__RootBinDir=%__ProjectDir%\bin" -set "__LogsDir=%__RootBinDir%\Logs" +set "__RootArtifactsDir=%__ProjectDir%\artifacts" +set "__LogsDir=%__RootArtifactsDir%\Logs\%__BuildType%" set "__MsbuildDebugLogsDir=%__LogsDir%\MsbuildDebugLogs" set __BuildAll= @@ -271,7 +261,7 @@ if %__BuildTypeDebug%==1 set __BuildType=Debug if %__BuildTypeChecked%==1 set __BuildType=Checked if %__BuildTypeRelease%==1 set __BuildType=Release -set __CommonMSBuildArgs=/p:__BuildOS=%__BuildOS% /p:__BuildType=%__BuildType% /p:__BuildArch=%__BuildArch% !__SkipRestoreArg! !__OfficialBuildIdArg! +set __CommonMSBuildArgs=/p:__BuildOS=%__BuildOS% /p:__BuildType=%__BuildType% /p:__BuildArch=%__BuildArch% !__SkipRestoreArg! !__OfficialBuildIdArg! /p:ArcadeBuild=true /p:Platform=%__BuildArch% if %__EnforcePgo%==1 ( if %__BuildArchArm%==1 ( @@ -303,9 +293,10 @@ if /i %__BuildType% NEQ Release set __RestoreOptData=0 REM REVIEW: why no System.Private.CoreLib NuGet package build for ARM64? if /i "%__BuildArch%"=="arm64" set __SkipNugetPackage=0 -set "__BinDir=%__RootBinDir%\Product\%__BuildOS%.%__BuildArch%.%__BuildType%" -set "__IntermediatesDir=%__RootBinDir%\obj\%__BuildOS%.%__BuildArch%.%__BuildType%" -if "%__NMakeMakefiles%"=="1" (set "__IntermediatesDir=%__RootBinDir%\nmakeobj\%__BuildOS%.%__BuildArch%.%__BuildType%") +set "__BinDir=%__RootArtifactsDir%\Product\%__BuildOS%\%__BuildArch%\%__BuildType%" +set "__IntermediatesDir=%__RootArtifactsDir%\obj\%__BuildOS%\%__BuildArch%\%__BuildType%" +set "__TestIntermediatesDir=%__RootArtifactsDir%\tests\obj\%__BuildOS%\%__BuildArch%\%__BuildType%" +if "%__NMakeMakefiles%"=="1" (set "__IntermediatesDir=%__RootArtifactsDir%\nmakeobj\%__BuildOS%\%__BuildArch%\%__BuildType%") set "__PackagesBinDir=%__BinDir%\.nuget" set "__CrossComponentBinDir=%__BinDir%" set "__CrossCompIntermediatesDir=%__IntermediatesDir%\crossgen" @@ -357,7 +348,6 @@ if not defined NumberOfCores ( set NumberOfCores=!TotalNumberOfCores! ) echo %__MsgPrefix%Number of processor cores %NumberOfCores% - REM ========================================================================================= REM === REM === Start the build steps @@ -367,10 +357,9 @@ REM ============================================================================ @if defined _echo @echo on call %__ProjectDir%\dotnet.cmd msbuild /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^ - /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log^ /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^ /p:UsePartialNGENOptimization=false /maxcpucount^ - %__ProjectDir%\build.proj /t:GenerateVersionHeader /p:GenerateVersionHeader=true /p:NativeVersionHeaderFile="%__RootBinDir%\obj\_version.h"^ + %__ProjectDir%\build.proj /t:GenerateNativeVersionFile ^ %__CommonMSBuildArgs% %__UnprocessedBuildArgs% REM ========================================================================================= @@ -381,7 +370,7 @@ REM ============================================================================ if %__RestoreOptData% EQU 1 ( echo %__MsgPrefix%Restoring the OptimizationData Package - call %__ProjectDir%\dotnet.cmd msbuild /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^ + call %__ProjectDir%\dotnet.cmd msbuild /nologo /verbosity:diag /clp:Summary /nodeReuse:false^ /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^ /p:UsePartialNGENOptimization=false /maxcpucount^ ./build.proj /t:RestoreOptData^ @@ -522,8 +511,7 @@ if %__BuildNative% EQU 1 ( set __MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr! set __Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! - call %__ProjectDir%\cmake_msbuild.cmd /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^ - /l:BinClashLogger,Tools/net46/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log^ + call %__ProjectDir%\cmake_msbuild.cmd /nologo /verbosity:diag /clp:Summary /nodeReuse:false^ /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^ /p:UsePartialNGENOptimization=false /maxcpucount %__IntermediatesDir%\install.vcxproj^ !__Logging! /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% %__CommonMSBuildArgs% /m:2 %__UnprocessedBuildArgs% @@ -589,8 +577,7 @@ if %__BuildCrossArchNative% EQU 1 ( set __MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr! set __Logging=!_MsbuildLog! !__MsbuildWrn! !__MsbuildErr! - call %__ProjectDir%\cmake_msbuild.cmd /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^ - /l:BinClashLogger,Tools/net46/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log^ + call %__ProjectDir%\cmake_msbuild.cmd /nologo /verbosity:diag /clp:Summary /nodeReuse:false^ /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^ /p:UsePartialNGENOptimization=false /maxcpucount^ %__CrossCompIntermediatesDir%\install.vcxproj^ @@ -649,8 +636,7 @@ if %__BuildCoreLib% EQU 1 ( set __MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr! set __Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! - call %__ProjectDir%\dotnet.cmd msbuild /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^ - /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log^ + call %__ProjectDir%\dotnet.cmd msbuild /nologo /verbosity:diag /clp:Summary /nodeReuse:false^ /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^ /p:UsePartialNGENOptimization=false /maxcpucount^ %__ProjectDir%\build.proj^ @@ -800,7 +786,7 @@ if %__BuildNativeCoreLib% EQU 1 ( set COMPlus_ContinueOnAssert=0 ) - set NEXTCMD="%__CrossgenExe%" %__IbcTuning% /Platform_Assemblies_Paths "%__BinDir%"\IL /out "%__BinDir%\System.Private.CoreLib.dll" "%__BinDir%\IL\System.Private.CoreLib.dll" + set NEXTCMD="%__CrossgenExe%" %__IbcTuning% /Platform_Assemblies_Paths "%__BinDir%\IL" /out "%__BinDir%\System.Private.CoreLib.dll" "%__BinDir%\IL\System.Private.CoreLib.dll" echo %__MsgPrefix%!NEXTCMD! echo %__MsgPrefix%!NEXTCMD! >> "%__CrossGenCoreLibLog%" !NEXTCMD! >> "%__CrossGenCoreLibLog%" 2>&1 @@ -848,8 +834,7 @@ if %__BuildPackages% EQU 1 ( set __Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! REM The conditions as to what to build are captured in the builds file. - call %__ProjectDir%\dotnet.cmd msbuild /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^ - /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log^ + call %__ProjectDir%\dotnet.cmd msbuild /nologo /verbosity:diag /clp:Summary /nodeReuse:false^ /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^ /p:UsePartialNGENOptimization=false /maxcpucount^ %__SourceDir%\.nuget\packages.builds^ diff --git a/build.proj b/build.proj index aca36aa7abd2..b9e92fa69d34 100644 --- a/build.proj +++ b/build.proj @@ -8,9 +8,9 @@ - + - + diff --git a/build.sh b/build.sh index cf3ed7e1a13d..82d323619310 100755 --- a/build.sh +++ b/build.sh @@ -57,7 +57,7 @@ usage() echo "-skipgenerateversion - disable version generation even if MSBuild is supported." echo "-ignorewarnings - do not treat warnings as errors" echo "-cmakeargs - user-settable additional arguments passed to CMake." - echo "-bindir - output directory (defaults to $__ProjectRoot/bin)" + echo "-bindir - output directory (defaults to $__ProjectRoot/artifacts)" echo "-msbuildonunsupportedplatform - build managed binaries even if distro is not officially supported." echo "-numproc - set the number of build processes." echo "-portablebuild - pass -portablebuild=false to force a non-portable build." @@ -994,7 +994,7 @@ __PackagesBinDir="$__BinDir/.nuget" __ToolsDir="$__RootArtifactsDir/tools" __TestWorkingDir="$__RootArtifactsDir/tests/$__BuildOS.$__BuildArch.$__BuildType" export __IntermediatesDir="$__RootArtifactsDir/obj/${__BuildOS}/${__BuildArch}/${__BuildType}" -__TestIntermediatesDir="$__RootArtifactsDir/tests/obj/$__BuildOS.$__BuildArch.$__BuildType" +__TestIntermediatesDir="$__RootArtifactsDir/tests/obj/$__BuildOS/$__BuildArch/$__BuildType" __isMSBuildOnNETCoreSupported=0 __CrossComponentBinDir="$__BinDir" diff --git a/dir.props b/dir.props index dfa1fd358acc..70b27089ec09 100644 --- a/dir.props +++ b/dir.props @@ -38,9 +38,9 @@ $(ProjectDir)src\ $(__BinDir)\ - $(RootBinDir)Product\$(BuildOS)\$(BuildArch)\$(BuildType)\ + $(__RootArtifactsDir)Product\$(BuildOS)\$(BuildArch)\$(BuildType)\ - <__IntermediatesDir Condition="'$(__IntermediatesDir)' == ''">$(RootBinDir)obj\$(BuildOS)\$(BuildArch)\$(BuildType) + <__IntermediatesDir Condition="'$(__IntermediatesDir)' == ''">$(__RootArtifactsDir)\obj\$(BuildOS)\$(BuildArch)\$(BuildType) $(__IntermediatesDir)\ - $(RootBinDir)obj\ + $(__RootArtifactsDir)obj\ $(BaseIntermediateOutputPath)$(BuildOS)\$(BuildArch)\$(BuildType)\$(MSBuildProjectName) $(RootBinDir)obj\$(BuildOS)\$(BuildArch)\$(BuildType)\$(MSBuildProjectName)\ $(BinDir) diff --git a/eng/Version.targets b/eng/Version.targets new file mode 100644 index 000000000000..013ff08f9b6a --- /dev/null +++ b/eng/Version.targets @@ -0,0 +1,99 @@ + + + + $(__RootArtifactsDir)\obj\_version.h + $(__RootArtifactsDir)/obj/_version.c + <_BuildNativeArgs>$(ArchGroup) $(ConfigurationGroup) $(OSGroup) outconfig $(Configuration) + true + + + + false + + + + + + + + + + + 0 + + + + + + + + + + + N/A + + + + + + $(RawGitBranchName.SubString(6)) + + + $(RawGitBranchName.SubString(15)) + + + + + + + dotnet + + + + + https://github.com/$(GitHubOwnerName)/$(GitHubRepositoryName) + + + + + + + + + $(USERNAME) + + + + + + + + + $(COMPUTERNAME) + + + + + + + + + + + + $(SourceRevisionId) %40BuiltBy: $(VersionUserName)-$(VersionHostName) + + $(SourceRevisionId) %40Branch: $(GitBranchName) + + $(SourceRevisionId) %40SrcCode: $(GitHubRepositoryUrl)/tree/$(LatestCommit) + + $(SourceRevisionId) %40Commit: $(LatestCommit) + + + + + + + + diff --git a/generateversionsourcefile.targets b/generateversionsourcefile.targets deleted file mode 100644 index 127eb8b83e95..000000000000 --- a/generateversionsourcefile.targets +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - - false - true - true - - - - - - true - $(AssemblyInfoPartialFileLink) - - - - - false - - - - $(RootIntermediateOutputPath) - $(NativeVersionFileDir)_version.h - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(RootIntermediateOutputPath) - $(NativeVersionSourceDir)version.c - - - - - - - - - - - - - - - - - - - - - - - $(GetNuGetPackageVersionsDependsOn);CreateVersionInfoFile - - - - $(RootIntermediateOutputPath) - $(SyncInfoDirectory)version.txt - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - N/A - - - - - - $(RawGitBranchName.SubString(6)) - - - $(RawGitBranchName.SubString(15)) - - - - - - - dotnet - - - - - https://github.com/$(GitHubOwnerName)/$(GitHubRepositoryName) - - - - - - - - - - - - - - - - - - - - git show -s --format=^%25%25cd --date=short HEAD - git show -s --format=%25cd --date=short HEAD - - - - 0 - - - - - - - - %(VersionTargetsFile.ModifiedTime) - VersionSeedDate was produced by getting the timestamp of versioning.targets. - - - VersionSeedDate was produced by taking the timestamp of the last git commit. - - - - - - - - - - - - - $(USERNAME) - - - - - - - - - - $(COMPUTERNAME) - - - - - - - - - - - - $(BuiltByString) %40BuiltBy: $(VersionUserName)-$(VersionHostName) - - $(BuiltByString) %40Branch: $(GitBranchName) - - $(BuiltByString) %40SrcCode: $(GitHubRepositoryUrl)/tree/$(LatestCommit) - - $(BuiltByString) %40Commit: $(LatestCommit) - - - - - - - - 5 - - 1996-04-01 - - - - - - - - - - - - - - - - - - true - $(BuildNumberMajor) - $(BuildNumberMinor) - $(LatestCommit) - $(BuiltByString) - - -]]> - - - - - - - - - - - - - - - - - - - - $(MajorVersion).$(MinorVersion).$(BuildNumberMajor).$(BuildNumberMinor) - - - - - - - -$(PreReleaseLabel) - $(VersionSuffix)-$(BuildNumberMajor)-$(BuildNumberMinor) - - - - - - - - - \ No newline at end of file diff --git a/init-tools.cmd b/init-tools.cmd index f7f7ff9395cd..b5f6ffa4c725 100644 --- a/init-tools.cmd +++ b/init-tools.cmd @@ -84,7 +84,7 @@ if NOT exist "%DOTNET_CMD%" ( :afterdotnetrestore -REM We do not need the build tools for arm64/x86 +REM We do not need the build tools for arm64/x86 if /i "%PROCESSOR_ARCHITEW6432%" == "arm64" ( goto :EOF ) @@ -93,28 +93,7 @@ if /i "%PROCESSOR_ARCHITECTURE%" == "arm64" ( goto :EOF ) -if exist "%BUILD_TOOLS_PATH%" goto :afterbuildtoolsrestore -echo Restoring BuildTools version %BUILDTOOLS_VERSION%... -echo Running: "%DOTNET_CMD%" restore "%INIT_TOOLS_RESTORE_PROJECT%" --no-cache --packages "%PACKAGES_DIR%" --source "%BUILDTOOLS_SOURCE%" /p:BuildToolsPackageVersion=%BUILDTOOLS_VERSION% /p:ToolsDir=%TOOLRUNTIME_DIR% >> "%INIT_TOOLS_LOG%" -call "%DOTNET_CMD%" restore "%INIT_TOOLS_RESTORE_PROJECT%" --no-cache --packages "%PACKAGES_DIR%" --source "%BUILDTOOLS_SOURCE%" /p:BuildToolsPackageVersion=%BUILDTOOLS_VERSION% /p:ToolsDir=%TOOLRUNTIME_DIR% >> "%INIT_TOOLS_LOG%" -if NOT exist "%BUILD_TOOLS_PATH%\init-tools.cmd" ( - echo ERROR: Could not restore build tools correctly. 1>&2 - goto :error -) - -:afterbuildtoolsrestore - -:: Ask init-tools to also restore ILAsm -set /p ILASMCOMPILER_VERSION=< "%~dp0ILAsmVersion.txt" - -echo Initializing BuildTools... -echo Running: "%BUILD_TOOLS_PATH%\init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> "%INIT_TOOLS_LOG%" -call "%BUILD_TOOLS_PATH%\init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" "%PACKAGES_DIR%" >> "%INIT_TOOLS_LOG%" -set INIT_TOOLS_ERRORLEVEL=%ERRORLEVEL% -if not [%INIT_TOOLS_ERRORLEVEL%]==[0] ( - echo ERROR: An error occured when trying to initialize the tools. 1>&2 - goto :error -) +powershell -NoProfile -ExecutionPolicy unrestricted -Command %~dp0eng\common\build.ps1 -restore -projects %~dp0eng\empty.proj :: Create semaphore file echo Done initializing tools. diff --git a/src/.nuget/packages.builds b/src/.nuget/packages.builds index 021c12d2eada..550d84e8a673 100644 --- a/src/.nuget/packages.builds +++ b/src/.nuget/packages.builds @@ -30,7 +30,6 @@ - diff --git a/src/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/System.Private.CoreLib/System.Private.CoreLib.csproj index 2968ebebec85..aa5b578e05ac 100644 --- a/src/System.Private.CoreLib/System.Private.CoreLib.csproj +++ b/src/System.Private.CoreLib/System.Private.CoreLib.csproj @@ -430,7 +430,7 @@ $(IntermediatesDir)\cmake.definitions - + true diff --git a/src/dlls/mscoree/coreclr/CMakeLists.txt b/src/dlls/mscoree/coreclr/CMakeLists.txt index 380c8ddfdef5..438abe9e16e9 100644 --- a/src/dlls/mscoree/coreclr/CMakeLists.txt +++ b/src/dlls/mscoree/coreclr/CMakeLists.txt @@ -168,16 +168,18 @@ if(WIN32) endif() set(DACTABLEGEN_EXE ${CMAKE_BINARY_DIR}/src/ToolBox/SOS/DacTableGen/dactablegen.exe) + set(INJECTRESOURCE_EXE ${CMAKE_BINARY_DIR}/src/tools/InjectResource/Debug/InjectResource.exe) + set(GENCLRDEBUGRESOURCE_EXE ${CMAKE_BINARY_DIR}/src/tools/GenClrDebugResource/Debug/GenClrDebugResource.exe) add_custom_command( DEPENDS coreclr mscordaccore mscordbi ${CLR_DIR}/src/debug/daccess/daccess.cpp OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/inject_debug_resources.timestamp COMMAND ${CMAKE_CXX_COMPILER} /P /EP /TP ${PREPROCESS_DEFINITIONS} ${INC_DIR} /Fi${CMAKE_CURRENT_BINARY_DIR}/daccess.i ${CLR_DIR}/src/debug/daccess/daccess.cpp COMMAND ${DACTABLEGEN_EXE} /dac:${CMAKE_CURRENT_BINARY_DIR}/daccess.i /pdb:${CMAKE_CURRENT_BINARY_DIR}/$/coreclr.pdb /dll:$ /bin:${CMAKE_CURRENT_BINARY_DIR}/wks.bin - COMMAND ${BuildToolsDir}/InjectResource.exe /bin:${CMAKE_CURRENT_BINARY_DIR}/wks.bin /dll:$ - COMMAND ${BuildToolsDir}/GenClrDebugResource.exe /dac:$ /dbi:$ /sku:onecoreclr /out:${CMAKE_CURRENT_BINARY_DIR}/clrDebugResource.bin - COMMAND ${BuildToolsDir}/InjectResource.exe /bin:${CMAKE_CURRENT_BINARY_DIR}/clrDebugResource.bin /dll:$ /name:CLRDEBUGINFO - COMMAND ${BuildToolsDir}/InjectResource.exe /bin:${CMAKE_CURRENT_SOURCE_DIR}/dump_helper_resource.bin /dll:$ /name:MINIDUMP_AUXILIARY_PROVIDER + COMMAND ${INJECTRESOURCE_EXE} /bin:${CMAKE_CURRENT_BINARY_DIR}/wks.bin /dll:$ + COMMAND ${GENCLRDEBUGRESOURCE_EXE} /dac:$ /dbi:$ /sku:onecoreclr /out:${CMAKE_CURRENT_BINARY_DIR}/clrDebugResource.bin + COMMAND ${INJECTRESOURCE_EXE} /bin:${CMAKE_CURRENT_BINARY_DIR}/clrDebugResource.bin /dll:$ /name:CLRDEBUGINFO + COMMAND ${INJECTRESOURCE_EXE} /bin:${CMAKE_CURRENT_SOURCE_DIR}/dump_helper_resource.bin /dll:$ /name:MINIDUMP_AUXILIARY_PROVIDER COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/inject_debug_resources.timestamp COMMENT Add dactable, debug resources, and dump helper resources to coreclr ) diff --git a/src/inc/readme.md b/src/inc/readme.md index 719401cb8e43..1e7754ea5e07 100644 --- a/src/inc/readme.md +++ b/src/inc/readme.md @@ -4,9 +4,9 @@ This directory has a variety of .idl files (such as corprof.idl) that need a lit the build rules would automatically convert the idls into corresponding .h/.c files and include them in compilations. On non-windows platforms we don't have an equivalent for midl.exe which did that conversion so we work around the issue by doing: -- Build on Windows as normal, which will generate files in bin\obj\Windows_NT.x64.Debug\src\inc\idls_out\ +- Build on Windows as normal, which will generate files in artifacts\obj\Windows_NT.x64.Debug\src\inc\idls_out\ - Copy any updated headers into src\pal\prebuilt\inc\ -- If needed, adjust any of the .cpp files in src\pal\prebuilt\idl\ by hand, using the corresponding bin\obj\Windows_NT.x64.Debug\src\inc\idls_out\*_i.c as a guide. Typically +- If needed, adjust any of the .cpp files in src\pal\prebuilt\idl\ by hand, using the corresponding artifacts\obj\Windows_NT.x64.Debug\src\inc\idls_out\*_i.c as a guide. Typically this is just adding MIDL_DEFINE_GUID(...) for any new classes/interfaces that have been added to the idl file. Include these src changes with the remainder of your work when you submit a PR. \ No newline at end of file diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index 5443e0ddb694..1c24ae7f687f 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt @@ -1 +1,3 @@ add_subdirectory(crossgen) +add_subdirectory(InjectResource) +add_subdirectory(GenClrDebugResource) diff --git a/src/tools/InjectResource/InjectResource.cpp b/src/tools/InjectResource/InjectResource.cpp index 1d5470f3f911..a48a16daa3ff 100644 --- a/src/tools/InjectResource/InjectResource.cpp +++ b/src/tools/InjectResource/InjectResource.cpp @@ -14,7 +14,7 @@ char* g_appName; void AddBinaryResourceToDll(__in_z char* dllName, - __in_z char* resName, + __in_z const char* resName, PVOID resData, ULONG resDataSize) {