pluots / mariadb-server

This is my fork of MariaDB that is dedicated to adding support for Rust plugins.
GNU General Public License v2.0
1 stars 0 forks source link

My local project config #12

Open tgross35 opened 11 months ago

tgross35 commented 11 months ago

I keep deleting it, here is my launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch with LLDB",
            "type": "lldb",
            "request": "launch",
            "program": "${workspaceFolder}/../build-mariadb-server-debug/sql/mariadbd",
            "args": [
                "--datadir=${workspaceFolder}/../data",
                "--socket=${workspaceFolder}/../mdb.sock",
                "--plugin-dir=${workspaceFolder}/../build-mariadb-server-debug/rust_target/debug",
                "--plugin-maturity=experimental",
                "--loose-clevis-key-management-tang-server=localhost:11697",
                "--gdb"
            ]
        }
    ]
}
tgross35 commented 11 months ago

Note that before this, need to run:

scripts/mariadb-install-db \
    --srcdir=... \
    --datadir=... \
    --builddir=...

With matching arguments

tgross35 commented 11 months ago

And my current config file:

#!/bin/sh

cmake ../mariadb-server \
  -DCMAKE_C_COMPILER=clang \
  -DCMAKE_CXX_COMPILER=clang++ \
  -DCMAKE_C_COMPILER_LAUNCHER=sccache \
  -DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
  -DCMAKE_EXPORT_COMPILE_COMMANDS=true \
  -DCMAKE_BUILD_TYPE=Debug \
  -DRUN_ABI_CHECK=NO \
  -DPLUGIN_MROONGA=NO \
  -DPLUGIN_ROCKSDB=NO \
  -DPLUGIN_SPIDER=NO \
  -DPLUGIN_SPHINX=NO \
  -DPLUGIN_TOKUDB=NO \
  -G Ninja

If building in a different dir (build-mdb-server for me) just need to symlink this output to the source directory

ln -s $(realpath ../build-mdb-server/compile_commands.json) $(realpath .)