diff options
author | Jeremy Koritzinsky <jekoritz@microsoft.com> | 2020-11-02 18:50:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-02 18:50:01 +0300 |
commit | 8c6a049cdb4bcd958cc3487775174bdd32e5fb64 (patch) | |
tree | ad0c9c276041a60f5b191459c70f19e9f159392c /src/tests/build.cmd | |
parent | 33056a9000f8067687bac54363b4215f16ac09a6 (diff) |
Enable using the Ninja generator instead of Visual Studio on Windows builds. (#41897)
* Move DacTableGen out of the CMake build and into tools-local.
* Attempt: usenmakefiles means ninja.
* Make changes to Windows build to support non-VS generators like ninja.
* Use CMake 3.16 PCHs.
* Remove explicit process count.
* Build and run DacTableGen via the .NET CLI we pull down for the build instead of via CMake.
* Update configurecompiler.cmake to specify language (needed for Ninja).
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Get Ninja build working again.
* Pass configuration to cmake configure step for Ninja build.
* Rename flag
* Fix configure step for cross-arch native build
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Support building via Ninja for coreclr via an MSBuild property
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Implement support for opening the CoreCLR solution in VS via the -vs flag.
* Fix setting generator to Ninja.
* Merge libraries gen-buildsys-win.bat with runtime gen-buildsys.cmd to share windows cmake configure infra.
* Enable building libraries native build with ninja.
* Centralize setting CMAKE_SYSTEM_VERSION for windows builds.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Update host build to use shared gen-buildsys.cmd
* Fix multi-config generator detection.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Exit with success when we build successfully.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Enable and fix up Ninja build for hosts.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Only link delayimp.lib on Windows
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Remove "overriding /W3 with /W1" warning in Ninja build of hosts by turning on /W3 and disabling any new warnings we hit.
* Reduce command line override warnings by adopting the MSVC_RUNTIME_LIBRARY abstraction feature in CMake 3.14+ (below the minimum requirement on Windows).
* Use the delayed expansion syntax to correctly pass in the config to cmake.
* Move all usages of MSVC runtime library selection to the CMake abstraction to reduce console spew about overridden flags.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Condition the rest of the compiler options correctly so they don't show up as invalid parameter warnings for assembly builds.
* Correctly build DIALib and DacTableGen as AnyCPU
* Fix WRITE_BARRIER_CHECK define
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Fix passing arch for MSBuild build.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Configure ASM compiler command line format in configurecompiler.cmake and use CMake's assembly compilation step to build ASM files for ARM/ARM64 instead of manually building them and adding the generated files as additional sources.
* Cleanup after fixing ARM/ARM64 support.
* Rename variable
* Condition PCH's for C++-only as needed to fix using them on non-Windows (where we compile C as C instead of as C++).
* Fix CoreCLR native test build on windows to point to new gen-buildsys location.
* Add missing compilation options in Ninja build that are implicitly defined in the MSBuild build.
* Disable analyzers for DacTableGen. Remove /MAP linker flag (that's for local testing).
* Upgrade to CMake 3.16.4
* Don't warn on unused variables in CMake (these usually vary on platform/config)
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Manually compile ARM and ARM64 asm files when using the VS generator since it doesn't support emitting MARMASM item types in projects (and as a result cannot compile ARM or ARM64 asm without assistance).
* Enable CMake policy in test build to use CMAKE_MSVC_RUNTIME_LIBRARY variable.
* Update initially disabled warnings in host.
* Add -ninja arg to root scripts to enable using Ninja.
* Enable using Ninja in CoreCLR CI.
* Try to fix passing the -ninja arg in yaml.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Add ninja to the Windows invocation
* Fix 2-phase cross targeting to do one phase at a time and initialize the VC++ environment for the correct build tools each time instead of interleaving them and relying on Visual Studio to handle the differing targets.
* Restore old /Ox optimization setting for Release.
* Fix typos, don't pass exception flags to C files.
* Remove unneeded pragma.
* Fix .pgd file installation.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Add mention of the `-ninja` flag in the Building CoreCLR documentation.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Mention installation locations for Ninja and warn while building if CMake is older than 3.16.0.
* Update docs/workflow/requirements/windows-requirements.md
Diffstat (limited to 'src/tests/build.cmd')
-rw-r--r-- | src/tests/build.cmd | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/tests/build.cmd b/src/tests/build.cmd index 499e069000d..09a579cb363 100644 --- a/src/tests/build.cmd +++ b/src/tests/build.cmd @@ -34,7 +34,6 @@ set __BuildType=Debug set __TargetOS=Windows_NT set "__ProjectFilesDir=%__TestDir%" -set "__SourceDir=%__RepoRootDir%\src\coreclr\src" set "__RootBinDir=%__RepoRootDir%\artifacts" set "__LogsDir=%__RootBinDir%\log" set "__MsbuildDebugLogsDir=%__LogsDir%\MsbuildDebugLogs" @@ -225,7 +224,7 @@ echo %__MsgPrefix%Commencing build of native test components for %__BuildArch%/% REM Set the environment for the native build REM Eval the output from set-cmake-path.ps1 -for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy ByPass "& ""%__SourceDir%\pal\tools\set-cmake-path.ps1"""') do %%a +for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy ByPass "& ""%__RepoRootDir%\eng\native\set-cmake-path.ps1"""') do %%a echo %__MsgPrefix%Using CMake from !CMakePath! REM NumberOfCores is an WMI property providing number of physical cores on machine @@ -256,7 +255,7 @@ if not defined VSINSTALLDIR ( if not exist "%VSINSTALLDIR%DIA SDK" goto NoDIA set __ExtraCmakeArgs="-DCMAKE_SYSTEM_VERSION=10.0" "-DCLR_ENG_NATIVE_DIR=%__RepoRootDir%/eng/native" -call "%__SourceDir%\pal\tools\gen-buildsys.cmd" "%__ProjectFilesDir%" "%__NativeTestIntermediatesDir%" %__VSVersion% %__BuildArch% !__ExtraCmakeArgs! +call "%__RepoRootDir%\eng\native\gen-buildsys.cmd" "%__ProjectFilesDir%" "%__NativeTestIntermediatesDir%" %__VSVersion% %__BuildArch% !__ExtraCmakeArgs! if not !errorlevel! == 0 ( echo %__ErrMsgPrefix%%__MsgPrefix%Error: failed to generate native component build project! |