Depending on what area you are working in change or add HB_DEBUG_<whatever>.
Values defined in hb-debug.hh.
CPPFLAGS='-DHB_DEBUG_SUBSET=100' meson setup build
meson test -C build
meson setup build -Db_sanitize=address
meson compile -C build
meson test -C build
meson setup build
meson compile -C build
meson test -C build --gdb testname
CPPFLAGS=-DHB_DEBUG_SUBSET=100 meson build
ninja -C build
meson build
ninja -Cbuild
meson test -Cbuild
CXXFLAGS="-fsanitize=address,fuzzer-no-link" meson build --default-library=static -Dfuzzer_ldflags="-fsanitize=address,fuzzer" -Dexperimental_api=true
ninja -C build test/fuzzing/hb-{shape,draw,subset,set}-fuzzer
build/test/fuzzing/hb-subset-fuzzer
meson build
meson compile -C build
build/perf/perf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
## Build & Run
Depending on what area you are working in change or add `HB_DEBUG_<whatever>`.
Values defined in `hb-debug.hh`.
```shell
CPPFLAGS='-DHB_DEBUG_SUBSET=100' meson setup build
meson test -C build
```
### Run tests with asan
```shell
meson setup build -Db_sanitize=address
meson compile -C build
meson test -C build
```
### Debug with GDB
```
meson setup build
meson compile -C build
meson test -C build --gdb testname
```
### Enable Debug Logging
```shell
CPPFLAGS=-DHB_DEBUG_SUBSET=100 meson build
ninja -C build
```
## Build and Test
```shell
meson build
ninja -Cbuild
meson test -Cbuild
```
## Test with the Fuzzer
```shell
CXXFLAGS="-fsanitize=address,fuzzer-no-link" meson build --default-library=static -Dfuzzer_ldflags="-fsanitize=address,fuzzer" -Dexperimental_api=true
ninja -C build test/fuzzing/hb-{shape,draw,subset,set}-fuzzer
build/test/fuzzing/hb-subset-fuzzer
```
## Profiling
```
meson build
meson compile -C build
build/perf/perf
```