From 740d926eee9f7cf15fb9fb94a38b367ba3f6595c Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 9 May 2023 19:48:42 -0400 Subject: docs: add meson option to use the unsafe loader --- docs/meson.build | 3 ++- docs/meson_options.txt | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 docs/meson_options.txt diff --git a/docs/meson.build b/docs/meson.build index 159ebc965..812a9ae7a 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -17,6 +17,7 @@ docs_gen = custom_target( sitemap = files('sitemap.txt') +yaml_loader = get_option('unsafe_yaml') ? 'fastyaml' : 'yaml' genrefman = find_program('./genrefman.py') refman_binary = custom_target( 'gen_refman_bin', @@ -25,7 +26,7 @@ refman_binary = custom_target( depfile: 'reman_dep.d', command: [ genrefman, - '-l', 'yaml', + '-l', yaml_loader, '-g', 'pickle', '-o', '@OUTPUT@', '--depfile', '@DEPFILE@', diff --git a/docs/meson_options.txt b/docs/meson_options.txt new file mode 100644 index 000000000..f548da98d --- /dev/null +++ b/docs/meson_options.txt @@ -0,0 +1,2 @@ +option('unsafe_yaml', type: 'boolean', value: false, + description: 'disable safety checks and use a faster, but less correct YAML loader') -- cgit v1.2.1