diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/Builtin-options.md | 1 | ||||
-rw-r--r-- | docs/markdown/Reference-manual.md | 8 | ||||
-rw-r--r-- | docs/markdown/snippets/pie.md | 6 |
3 files changed, 13 insertions, 2 deletions
diff --git a/docs/markdown/Builtin-options.md b/docs/markdown/Builtin-options.md index 55d82a5..ce14304 100644 --- a/docs/markdown/Builtin-options.md +++ b/docs/markdown/Builtin-options.md @@ -82,6 +82,7 @@ platforms or with all compilers: | b_pgo | off | off, generate, use | Use profile guided optimization | | b_sanitize | none | see below | Code sanitizer to use | | b_staticpic | true | true, false | Build static libraries as position independent | +| b_pie | false | true, false | Build position-independent executables (since 0.49.0)| The value of `b_sanitize` can be one of: `none`, `address`, `thread`, `undefined`, `memory`, `address,undefined`. diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index e4c9303..44545c5 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -552,6 +552,7 @@ be passed to [shared and static libraries](#library). - `d_unittest`, when set to true, the D modules are compiled in debug mode - `d_module_versions` list of module version identifiers set when compiling D sources - `d_debug` list of module debug identifiers set when compiling D sources +- `pie` *(added 0.49.0)* build a position-independent executable The list of `sources`, `objects`, and `dependencies` is always flattened, which means you can freely nest and add lists while @@ -1794,7 +1795,7 @@ The following keyword arguments can be used: required to find the header or symbol. For example, you might need to pass the include path `-Isome/path/to/header` if a header is not in the default include path. In versions newer than 0.38.0 you - should use the `include_directories` keyword described above. You + should use the `include_directories` keyword described below. You may also want to pass a library name `-lfoo` for `has_function` to check for a function. Supported by all methods except `get_id`, `version`, and `find_library`. @@ -1807,6 +1808,9 @@ The following keyword arguments can be used: `run()`. If this keyword argument is not passed to those methods, no message will be printed about the check. +- `no_builtin_args` when set to true, the compiler arguments controlled + by built-in configuration options are not added. + - `prefix` can be used to add #includes and other things that are required for the symbol to be declared. System definitions should be passed via compiler args (eg: `_GNU_SOURCE` is often required for @@ -1815,7 +1819,7 @@ The following keyword arguments can be used: `sizeof`, `has_type`, `has_function`, `has_member`, `has_members`, `check_header`, `has_header`, `has_header_symbol`. -**Note:** These compiler checks do not use compiler arguments added with +**Note:** These compiler checks do not use compiler arguments added with `add_*_arguments()`, via `-Dlang_args` on the command-line, or through `CFLAGS`/`LDFLAGS`, etc in the environment. Hence, you can trust that the tests will be fully self-contained, and won't fail because of custom diff --git a/docs/markdown/snippets/pie.md b/docs/markdown/snippets/pie.md new file mode 100644 index 0000000..a9be174 --- /dev/null +++ b/docs/markdown/snippets/pie.md @@ -0,0 +1,6 @@ +## Position-independent executables + +When `b_pie` option, or `executable()`'s `pie` keyword argument is set to +`true`, position-independent executables are built. All their objects are built +with `-fPIE` and the executable is linked with `-pie`. Any static library they +link must be built with `pic` set to `true` (see `b_staticpic` option). |