diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-02-06 11:59:45 -0800 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-03-28 00:59:46 +0200 |
commit | 7fd42a5be4f30ddc48fd058e32169053f5f972d2 (patch) | |
tree | 92bdb30e4597d408417d899af4ee43ae0bcf2e88 /docs/markdown/Native-environments.md | |
parent | 4e52a0f7fd9f6490fe31781809f2871a918be458 (diff) | |
download | meson-7fd42a5be4f30ddc48fd058e32169053f5f972d2.zip meson-7fd42a5be4f30ddc48fd058e32169053f5f972d2.tar.gz meson-7fd42a5be4f30ddc48fd058e32169053f5f972d2.tar.bz2 |
docs: Add a new page with common cross/native file options [skip ci]
Rather than having two separate sections with duplicated information
lets just have one for the common settings, and only document sections
specific to each file in separately
Diffstat (limited to 'docs/markdown/Native-environments.md')
-rw-r--r-- | docs/markdown/Native-environments.md | 54 |
1 files changed, 3 insertions, 51 deletions
diff --git a/docs/markdown/Native-environments.md b/docs/markdown/Native-environments.md index a046ee9..8dcce2a 100644 --- a/docs/markdown/Native-environments.md +++ b/docs/markdown/Native-environments.md @@ -19,69 +19,21 @@ persistent environment: * To build with a non-default native tool chain (such as clang instead of gcc) * To use a non-default version of another binary, such as yacc, or llvm-config - ## Changing native file settings All of the rules about cross files and changed settings apply to native files as well, see [here](Cross-compilation.md#changing-cross-file-settings) - ## Defining the environment -### Binaries - -Currently the only use of native files is to override native binaries. This -includes the compilers and binaries collected with `find_program`, and those -used by dependencies that use a config-tool instead of pkgconfig for detection, -like `llvm-config` - -```ini -[binaries] -c = '/usr/local/bin/clang' -cpp = '/usr/local/bin/clang++' -rust = '/usr/local/bin/rust' -c_ld = 'gold' -cpp_ld = 'gold' -rust_ld = 'gold' -llvm-config = '/usr/local/llvm-svn/bin/llvm-config' -``` - -### Paths and Directories - -As of 0.50.0 paths and directories such as libdir can be defined in the native -file in a paths section - -```ini -[paths] -libdir = 'mylibdir' -prefix = '/my prefix' -``` - -These values will only be loaded when not cross compiling. Any arguments on the -command line will override any options in the native file. For example, passing -`--libdir=otherlibdir` would result in a prefix of `/my prefix` and a libdir of -`otherlibdir`. - - -## Loading multiple native files - -Native files allow layering (cross files can be layered since meson 0.52.0). -More than one native file can be loaded, with values from a previous file being -overridden by the next. The intention of this is not overriding, but to allow -composing native files. - -For example, if there is a project using C and C++, python 3.4-3.7, and LLVM -5-7, and it needs to build with clang 5, 6, and 7, and gcc 5.x, 6.x, and 7.x; -expressing all of these configurations in monolithic configurations would -result in 81 different native files. By layering them, it can be expressed by -just 12 native files. - +See the [config-files section](Machine-files.md), for options shared by cross +and native files. ## Native file locations Like cross files, native files may be installed to user or system wide locations, defined as: - - $XDG_DATA_DIRS/meson/native + - $XDG_DATA_DIRS/meson/native (/usr/local/share/meson/native:/usr/share/meson/native if $XDG_DATA_DIRS is undefined) - $XDG_DATA_HOME/meson/native ($HOME/.local/share/meson/native if |