• J
    Enable using the Ninja generator instead of Visual Studio on Windows builds. (#41897) · 8c6a049c
    Jeremy Koritzinsky 提交于
    * 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: NJeremy 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: NJeremy Koritzinsky <jekoritz@microsoft.com>
    
    * Support building via Ninja for coreclr via an MSBuild property
    Signed-off-by: NJeremy 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: NJeremy Koritzinsky <jekoritz@microsoft.com>
    
    * Update host build to use shared gen-buildsys.cmd
    
    * Fix multi-config generator detection.
    Signed-off-by: NJeremy Koritzinsky <jekoritz@microsoft.com>
    
    * Exit with success when we build successfully.
    Signed-off-by: NJeremy Koritzinsky <jekoritz@microsoft.com>
    
    * Enable and fix up Ninja build for hosts.
    Signed-off-by: NJeremy Koritzinsky <jekoritz@microsoft.com>
    
    * Only link delayimp.lib on Windows
    Signed-off-by: NJeremy 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: NJeremy 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: NJeremy Koritzinsky <jekoritz@microsoft.com>
    
    * Fix passing arch for MSBuild build.
    Signed-off-by: NJeremy 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: NJeremy 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: NJeremy 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: NJeremy Koritzinsky <jekoritz@microsoft.com>
    
    * Add mention of the `-ninja` flag in the Building CoreCLR documentation.
    Signed-off-by: NJeremy 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
    8c6a049c
global.json 733 字节