Added guard around llvm/IR/IntrinsicsX86.h inclusion, seems to only be needed for version 10?\nMore Investigation needed here.\nChanged Debugger/IMGui.{h,cpp} to IMGui_I so it will build in filesystems that aren't case sensitive.\nAdded CMakeSettings.json that has profiles to build from VisualStudio, using env variables to control system specific options. \n Currently only the WSL is tested (and working). \nRemote should work as well, if correct string for preconfigured remote is in env variable fexremote.\nCross compile (to linux) untested, using sysroot in env variable fexsysroot

This commit is contained in:
David Miller 2020-04-23 16:12:28 -04:00
parent a8d3cd67ad
commit 5999e7477f
6 changed files with 141 additions and 4 deletions

132
CMakeSettings.json Normal file
View File

@ -0,0 +1,132 @@
{
"environments": [
{
"BuildPath": "${projectDir}\\out\\build\\${name}",
"InstallPath": "${projectDir}\\out\\install\\${name}",
"clangcl": "clang-cl.exe",
"cc": "clang",
"cxx": "clang++"
}
],
"configurations": [
{
"name": "WSL-Clang-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${env.BuildPath}",
"installRoot": "${env.InstallPath}",
"cmakeExecutable": "/usr/bin/cmake",
"cmakeCommandArgs": "",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"wslPath": "${defaultWSLPath}",
"inheritEnvironments": [ "linux_clang_x64" ],
"addressSanitizerRuntimeFlags": "detect_leaks=0",
"variables": [
{
"name": "WSL",
"type": "BOOL",
"value": "TRUE"
}
]
},
{
"name": "WSL-Clang-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${env.BuildPath}",
"installRoot": "${env.InstallPath}",
"cmakeExecutable": "/usr/bin/cmake",
"cmakeCommandArgs": "",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"wslPath": "${defaultWSLPath}",
"inheritEnvironments": [ "linux_clang_x64" ],
"addressSanitizerRuntimeFlags": "detect_leaks=0",
"variables": [
{
"name": "WSL",
"type": "BOOL",
"value": "TRUE"
}
]
},
{
"name": "x86-Clang-Cross-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${env.BuildPath}",
"installRoot": "${env.InstallPath}",
"cmakeCommandArgs": "",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"inheritEnvironments": [ "clang_cl_x86" ],
"variables": [
{
"name": "CMAKE_C_COMPILER",
"type": "STRING",
"value": "${env.cc}"
},
{
"name": "CMAKE_CXX_COMPILER",
"type": "STRING",
"value": "${env.cxx}"
},
{
"name": "CMAKE_SYSROOT",
"type": "STRING",
"value": "${env.fexsysroot}"
}
]
},
{
"name": "x64-Clang-Cross-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${env.BuildPath}",
"installRoot": "${env.InstallPath}",
"cmakeCommandArgs": "",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"inheritEnvironments": [ "clang_cl_x86" ],
"variables": [
{
"name": "CMAKE_C_COMPILER",
"type": "STRING",
"value": "${env.cc}"
},
{
"name": "CMAKE_CXX_COMPILER",
"type": "STRING",
"value": "${env.cxx}"
},
{
"name": "CMAKE_SYSROOT",
"type": "STRING",
"value": "${env.fexsysroot}"
}
]
},
{
"name": "Linux-Clang-Remote-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"cmakeExecutable": "/usr/bin/cmake",
"remoteCopySourcesExclusionList": [ ".vs", ".vscode", ".git", ".github", "build", "out", "bin" ],
"cmakeCommandArgs": "",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"inheritEnvironments": [ "linux_clang_x64" ],
"remoteMachineName": "${env.fexremote}", // string "-662331587;z.port0.org (username=ubuntu, port=22, authentication=PrivateKey)",
"remoteCMakeListsRoot": "$HOME/projects/.vs/${projectDirName}/src",
"remoteBuildRoot": "$HOME/projects/.vs/${projectDirName}/build/${name}",
"remoteInstallRoot": "$HOME/projects/.vs/${projectDirName}/install/${name}",
"remoteCopySources": true,
"rsyncCommandArgs": "-t --delete --delete-excluded",
"remoteCopyBuildOutput": false,
"remoteCopySourcesMethod": "rsync",
"addressSanitizerRuntimeFlags": "detect_leaks=0",
"variables": []
}
]
}

View File

@ -13,7 +13,12 @@
#include <llvm/IR/LLVMContext.h> #include <llvm/IR/LLVMContext.h>
#include <llvm/IR/LegacyPassManager.h> #include <llvm/IR/LegacyPassManager.h>
#include <llvm/IR/Verifier.h> #include <llvm/IR/Verifier.h>
#include <llvm/IR/IntrinsicsX86.h>
// This seems to be needed for LLVM-10, and isn't needed/built from IntrinsicsX86.td in LLVM-9?
#if __has_include (<llvm/IR/IntrinsicsX86.h>)
#include <llvm/IR/IntrinsicsX86.h>
#endif
#include <llvm/Passes/PassBuilder.h> #include <llvm/Passes/PassBuilder.h>
#include <llvm/Support/raw_ostream.h> #include <llvm/Support/raw_ostream.h>
#include <llvm/Support/TargetSelect.h> #include <llvm/Support/TargetSelect.h>

View File

@ -3,7 +3,7 @@ set(SRCS Main.cpp
DebuggerState.cpp DebuggerState.cpp
Context.cpp Context.cpp
FEXImGui.cpp FEXImGui.cpp
IMGui.cpp IMGui_I.cpp
IRLexer.cpp IRLexer.cpp
GLUtils.cpp GLUtils.cpp
MainWindow.cpp MainWindow.cpp

View File

@ -1,7 +1,7 @@
#include "DebuggerState.h" #include "DebuggerState.h"
#include "Disassembler.h" #include "Disassembler.h"
#include "FEXImGui.h" #include "FEXImGui.h"
#include "IMGui.h" #include "IMGui_I.h"
#include "LogManager.h" #include "LogManager.h"
#include "IRLexer.h" #include "IRLexer.h"
#include "Common/Config.h" #include "Common/Config.h"

View File

@ -5,7 +5,7 @@
#include "MainWindow.h" #include "MainWindow.h"
#include "Context.h" #include "Context.h"
#include "GLUtils.h" #include "GLUtils.h"
#include "IMGui.h" #include "IMGui_I.h"
#include "DebuggerState.h" #include "DebuggerState.h"
#include "LogManager.h" #include "LogManager.h"