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