pgo: fix PGO builds with clang

Add stubs for shm_chain_new(), shm_chain_free() and shm_unref(). This
fixes ‘pgo’ linking failures in the ‘generate’ phase when doing a PGO
build with clang.

Closes #642
This commit is contained in:
Daniel Eklöf 2021-07-22 10:02:52 +02:00
parent 029920ddcc
commit 2acd4b34c5
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 11 additions and 0 deletions

View file

@ -38,6 +38,7 @@
* Rendering into the right margin area with `tweak.overflowing-glyphs`
enabled.
* PGO builds with clang (https://codeberg.org/dnkl/foot/issues/642).
### Security

View file

@ -142,6 +142,16 @@ void reaper_del(struct reaper *reaper, pid_t pid) {}
void urls_reset(struct terminal *term) {}
void shm_unref(struct buffer *buf) {}
void shm_chain_free(struct buffer_chain *chain) {}
struct buffer_chain *
shm_chain_new(struct wl_shm *shm, bool scrollable, size_t pix_instances)
{
return NULL;
}
int
main(int argc, const char *const *argv)
{