-
Notifications
You must be signed in to change notification settings - Fork 22
Building the VSIX
Struct Layout uses llvm + clang libtooling and DIA SDK to parse the C++ files and extract the requested memory layouts. This means that the C# VSIX extension uses several external applications that will need to be compiled first.
First step would be to get the llvm-project with clang.
For simplicity, it is recommended to place the llvm project in the <github-root>/External/llvm-project
folder. (this is where the layout parser project will seek the includes and libraries).
There is more detailed information on how to set it up at the Getting Started with Clang page. The command line that needs to be run inside the llvm-project
folder is:
mkdir build
cd build
cmake -DLLVM_ENABLE_PROJECTS=clang -G "Visual Studio 16 2019" -A x64 -Thost=x64 ..\llvm
Clone the repository Viladoman/ClangArtifacts to folder <github-root>/External
. This should bring the necesary includes and library used to built the latest version of this repository. This is the same process that the github action does.
Open the ClangLayout solution found at Parsers/ClangLayout/ClangLayout.sln and build on Release.
Open the PDBLayout solution found at Parsers/PDBLayout/PDBLayout.sln and build on Release.
Open and build the solution found at StructLayout/StructLayout.sln. This will automatically pull the ClangLayout.exe and PDBLayout.exe (and its dlls) from the previously generated output path. There are also sample projects for testing at TestProjects/.