From b3fe4a0a18edbd85c3a9e119912c968960f99574 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Wed, 30 Oct 2019 22:49:17 +0200 Subject: Add option for controlling RTTI. --- docs/markdown/Builtin-options.md | 1 + docs/markdown/FAQ.md | 11 +++++++++++ docs/markdown/snippets/nortti.md | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 docs/markdown/snippets/nortti.md (limited to 'docs/markdown') diff --git a/docs/markdown/Builtin-options.md b/docs/markdown/Builtin-options.md index 3219af85f..4172f1a97 100644 --- a/docs/markdown/Builtin-options.md +++ b/docs/markdown/Builtin-options.md @@ -144,6 +144,7 @@ compiler being used: | cpp_std | none | none, c++98, c++03, c++11, c++14, c++17,
c++1z, gnu++03, gnu++11, gnu++14, gnu++17, gnu++1z,
vc++14, vc++17, vc++latest | C++ language standard to use | | cpp_debugstl | false | true, false | C++ STL debug mode | | cpp_eh | default | none, default, a, s, sc | C++ exception handling type | +| cpp_rtti | true | true, false | Whether to enable RTTI (runtime type identification) | | cpp_winlibs | see below | free-form comma-separated list | Standard Windows libs to link against | The default values of `c_winlibs` and `cpp_winlibs` are in compiler-specific diff --git a/docs/markdown/FAQ.md b/docs/markdown/FAQ.md index 06379aec7..7625361cf 100644 --- a/docs/markdown/FAQ.md +++ b/docs/markdown/FAQ.md @@ -489,3 +489,14 @@ libbar = library('bar', sources: libbar_sources, dependencies: libfoo_dep) A good example of a generator that outputs both sources and headers is [`gnome.mkenums()`](https://mesonbuild.com/Gnome-module.html#gnomemkenums). + +## How do I disable exceptions and RTTI in my C++ project? + +With the `cpp_eh` and `cpp_rtti` options. A typical invocation would +look like this: + +``` +meson -Dcpp_eh=none -Dcpp_rtti=false +``` + +The RTTI option is only available since Meson version 0.53.0. diff --git a/docs/markdown/snippets/nortti.md b/docs/markdown/snippets/nortti.md new file mode 100644 index 000000000..63d85c5ac --- /dev/null +++ b/docs/markdown/snippets/nortti.md @@ -0,0 +1,3 @@ +## Added global option to disable C++ RTTI + +The new boolean option is called `cpp_rtti`. -- cgit v1.2.3