Better dev container

This commit is contained in:
Nils Hölscher 2022-07-15 07:42:04 +00:00
parent 73e16bd797
commit 65c74a1883
4 changed files with 43 additions and 49 deletions

View File

@ -12,7 +12,10 @@
"matepek.vscode-catch2-test-adapter", "matepek.vscode-catch2-test-adapter",
"twxs.cmake", "twxs.cmake",
"vadimcn.vscode-lldb", "vadimcn.vscode-lldb",
"xaver.clang-format" "xaver.clang-format",
"yzhang.markdown-all-in-one",
"shd101wyy.markdown-preview-enhanced",
"streetsidesoftware.code-spell-checker"
], ],
// Use 'forwardPorts' to make a list of ports inside the container available locally. // Use 'forwardPorts' to make a list of ports inside the container available locally.

77
.vscode/launch.json vendored
View File

@ -4,21 +4,6 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
// {
// "type": "lldb",
// "request": "launch",
// "name": "LLDB Unrolling",
// "program": "/usr/bin/opt",
// "args": [
// "-load-pass-plugin",
// "${workspaceFolder}/build/libCacheAnalysisPass.so",
// "-passes=lru-misses",
// "${workspaceFolder}/test/cnt.ll",
// "-o",
// "/dev/null"
// ],
// "cwd": "${workspaceFolder}"
// },
{ {
"type": "lldb", "type": "lldb",
"request": "launch", "request": "launch",
@ -34,36 +19,36 @@
], ],
"cwd": "${workspaceFolder}" "cwd": "${workspaceFolder}"
}, },
{ // {
"name": "gdb fft1", // "name": "gdb fft1",
"type": "cppdbg",//Only Usable with C/C++ extension installed from Microsoft. // "type": "cppdbg",//Only Usable with C/C++ extension installed from Microsoft.
"request": "launch", // "request": "launch",
"program": "/usr/bin/opt", // "program": "/usr/bin/opt",
"args": [ // "args": [
"-load-pass-plugin", // "-load-pass-plugin",
"${fileDirname}/../build/lib/libCacheAnalysisPass.so", // "${fileDirname}/../build/lib/libCacheAnalysisPass.so",
"-passes='lru-misses'", // "-passes='lru-misses'",
"${fileDirname}/../test/fft1.ll", // "${fileDirname}/../test/fft1.ll",
"-o", // "-o",
"/dev/null" // "/dev/null"
], // ],
"stopAtEntry": false, // "stopAtEntry": false,
"cwd": "${fileDirname}", // "cwd": "${fileDirname}",
"environment": [], // "environment": [],
"externalConsole": false, // "externalConsole": false,
"MIMode": "gdb", // "MIMode": "gdb",
"setupCommands": [ // "setupCommands": [
{ // {
"description": "Enable pretty-printing for gdb", // "description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing", // "text": "-enable-pretty-printing",
"ignoreFailures": true // "ignoreFailures": true
}, // },
{ // {
"description": "Set Disassembly Flavor to Intel", // "description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel", // "text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true // "ignoreFailures": true
} // }
] // ]
} // }
] ]
} }

8
.vscode/tasks.json vendored
View File

@ -3,10 +3,16 @@
// for the documentation about the tasks.json format // for the documentation about the tasks.json format
"version": "2.0.0", "version": "2.0.0",
"tasks": [ "tasks": [
{
"label": "config",
"type": "shell",
"command": "rm -r build ; rm complile_commands.json ; mkdir build ; cd build ; cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DLT_LLVM_INSTALL_DIR=$LLVM_DIR ..",
"group": "build"
},
{ {
"label": "build", "label": "build",
"type": "shell", "type": "shell",
"command": "./helper.sh all", "command": " cd build ; ninja ",
"group": "build" "group": "build"
}, },
] ]

View File

@ -11,7 +11,7 @@ config () {
mkdir build mkdir build
cd build cd build
echo "==== Configuring cmake ====" echo "==== Configuring cmake ===="
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DLT_LLVM_INSTALL_DIR=/usr .. cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DLT_LLVM_INSTALL_DIR=$LLVM_DIR ..
cd .. cd ..
cp build/compile_commands.json compile_commands.json cp build/compile_commands.json compile_commands.json
echo "==== Done! ====" echo "==== Done! ===="