Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dynamorio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,467
    • Issues 1,467
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynamoRIO
  • dynamorio
  • Merge requests
  • !5274

i#3805 msvc2019: add support for Microsoft Visual Studio 2019 and Tools for Visual Studio 2019

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged S.J.R. van Schaik requested to merge github/fork/StephanvanSchaik/i3805-msvc2019 into master Jan 11, 2022
  • Overview 16
  • Commits 11
  • Pipelines 0
  • Changes 5

This addresses issue #3805 (closed) as follows:

  • Remove old detection code for CMake versions older than 2.6.3 to detect cl_path. This was hindering CMake from finding the correct cl_path.
  • Ensure cl_path is defined before cpp2asm_support.cmake gets included, such that ml.exe and ml64.exe for x86 and x64 respectively are found in the correct path.
  • Specify cl_path as a hint when trying to find lib.exe and dumpbin.exe.
  • The Windows SDK that is being used may be installed into C:\Program Files (x86)\Windows Kits\10, of which the installation path is covered by a different registry key, namely HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots\KitsRoot10. Check if the registry key points to an existing path, and use it as kits_dir if it does and then use that to derive the correct sdk_bindir. Otherwise fall back to the old method of detecting sdk_bin and sdk_bindir.
  • When MFC is installed, this will try building drstats. Since drstats has hardcoded paths to Uuid.Lib, we now simply use kits_dir to specify the correct path to Uuid.Lib.

I have tested this with Tools for Visual Studio 2019 as follows:

git clone https://github.com/StephanvanSchaik/dynamorio -b i3805-msvc2019
cd dynamorio
mkdir build
cd build
cmake ..
cmd.exe
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64
msbuild.exe DynamoRIO.sln

This builds everything successfully. However, do note that you should not have Windows 11 SDK (version 10.0.22000.0) installed. Trying to build DynamoRIO against the Windows 11 SDK will fail with rc.exe emitting error RC2188 due to line 253 in C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\winnt.h. See also: https://bugs.python.org/issue45220 (EDIT: the fix for this is to ensure _AMD64_ or _X86_ are defined when building).

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/StephanvanSchaik/i3805-msvc2019