[Lldb-commits] Inconsistency in cmakefile vs code

Carlo Kok via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 10 01:08:21 PDT 2019


In:
lldb\source\Plugins\Process\Windows\Common\CMakeLists.txt

these files are built based on the SYSTEM Architecture:

if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
  target_sources(lldbPluginProcessWindowsCommon PRIVATE
    x64/RegisterContextWindows_x64.cpp)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i?86|X86")
  target_sources(lldbPluginProcessWindowsCommon PRIVATE
    x86/RegisterContextWindows_x86.cpp)
endif()


but later they're used based on the defines (which will the target arch, it's not uncommon to compile on x86_64 for i386, since the engine has to match exactly on Windows)
#if defined(_M_AMD64)
...
#if defined(_M_IX86)
...

Locally I've changed this to unconditionally include the files and use ifdefs in the context files. but that is less than ideal.


More information about the lldb-commits mailing list