diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-09-21 19:29:15 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-09-22 15:23:01 +0200 |
commit | 6d862a9dc08285fffb9da29055235b5c9935dcf8 (patch) | |
tree | ebd4807759776ce8dcf6075b4273cd847fbbd5c7 /mkosi.clangd | |
parent | Preset user units on first boot as well (diff) | |
download | systemd-6d862a9dc08285fffb9da29055235b5c9935dcf8.tar.xz systemd-6d862a9dc08285fffb9da29055235b5c9935dcf8.zip |
mkosi: Add back support for running clangd within mkosi
This allows hacking on systemd without installing any build
dependencies except mkosi on the host machine.
Diffstat (limited to 'mkosi.clangd')
-rwxr-xr-x | mkosi.clangd | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mkosi.clangd b/mkosi.clangd new file mode 100755 index 0000000000..80d544677a --- /dev/null +++ b/mkosi.clangd @@ -0,0 +1,20 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1-or-later + +MKOSI_CONFIG="$(mkosi --json summary | jq -r .Images[-1])" +DISTRIBUTION="$(jq -r .Distribution <<< "$MKOSI_CONFIG")" +RELEASE="$(jq -r .Release <<< "$MKOSI_CONFIG")" +ARCH="$(jq -r .Architecture <<< "$MKOSI_CONFIG")" + +exec mkosi \ + --incremental=strict \ + --format=none \ + build \ + clangd \ + --compile-commands-dir=/work/build \ + --path-mappings="\ +$(pwd)=/work/src,\ +$(pwd)/build/mkosi.builddir/$DISTRIBUTION~$RELEASE~$ARCH/=/work/build,\ +$(pwd)/build/mkosi.cache/$DISTRIBUTION~$RELEASE~$ARCH~build.cache/usr/include/=/usr/include" \ + "$@" + |