2017-09-17 00:16:00 +08:00
# Reference tables
## Compiler ids
2018-10-17 01:03:13 +08:00
These are return values of the `get_id` (Compiler family) and
`get_argument_syntax` (Argument syntax) method in a compiler object.
2018-10-25 10:24:05 +08:00
| Value | Compiler family | Argument syntax |
| ----- | --------------- | --------------- |
2018-11-22 19:49:45 +08:00
| arm | ARM compiler | |
| armclang | ARMCLANG compiler | |
| ccrx | Renesas RX Family C/C++ compiler | |
2018-10-25 10:24:05 +08:00
| clang | The Clang compiler | gcc |
2018-11-22 19:49:45 +08:00
| clang-cl | The Clang compiler (MSVC compatible driver) | msvc |
| dmd | D lang reference compiler | |
| g95 | The G95 Fortran compiler | |
| gcc | The GNU Compiler Collection | gcc |
2018-10-25 10:24:05 +08:00
| intel | Intel compiler | msvc on windows, otherwise gcc |
2018-11-22 19:49:45 +08:00
| lcc | Elbrus C/C++/Fortran Compiler | |
2018-10-25 10:24:05 +08:00
| llvm | LLVM-based compiler (Swift, D) | |
| mono | Xamarin C# compiler | |
2018-11-22 19:49:45 +08:00
| msvc | Microsoft Visual Studio | msvc |
| nagfor | The NAG Fortran compiler | |
| open64 | The Open64 Fortran Compiler | |
2018-10-25 10:24:05 +08:00
| pathscale | The Pathscale Fortran compiler | |
| pgi | The Portland Fortran compiler | |
2018-11-22 19:49:45 +08:00
| rustc | Rust compiler | |
2018-10-25 10:24:05 +08:00
| sun | Sun Fortran compiler | |
2018-11-22 19:49:45 +08:00
| valac | Vala compiler | |
2017-09-17 00:16:00 +08:00
## Script environment variables
| Value | Comment |
| ----- | ------- |
| MESONINTROSPECT | Command to run to run the introspection command, may be of the form `python /path/to/meson introspect` , user is responsible for splitting the path if necessary. |
2018-11-22 19:49:45 +08:00
| MESON_BUILD_ROOT | Absolute path to the build dir |
2018-07-18 22:11:57 +08:00
| MESON_DIST_ROOT | Points to the root of the staging directory, only set when running `dist` scripts |
2018-11-22 19:49:45 +08:00
| MESON_SOURCE_ROOT | Absolute path to the source dir |
| MESON_SUBDIR | Current subdirectory, only set for `run_command` |
2018-07-18 22:11:57 +08:00
2017-09-17 00:16:00 +08:00
## CPU families
These are returned by the `cpu_family` method of `build_machine` ,
`host_machine` and `target_machine` . For cross compilation they are
set in the cross file.
| Value | Comment |
| ----- | ------- |
2018-06-01 19:31:38 +08:00
| aarch64 | 64 bit ARM processor |
2018-11-22 19:49:45 +08:00
| arc | 32 bit ARC processor |
| arm | 32 bit ARM processor |
| e2k | MCST Elbrus processor |
| ia64 | Itanium processor |
2018-06-20 20:45:44 +08:00
| mips | 32 bit MIPS processor |
| mips64 | 64 bit MIPS processor |
2018-11-22 19:49:45 +08:00
| parisc | HP PA-RISC processor |
2018-07-06 23:53:49 +08:00
| ppc | 32 bit PPC processors |
| ppc64 | 64 bit PPC processors |
2018-07-15 04:03:39 +08:00
| riscv32 | 32 bit RISC-V Open ISA|
| riscv64 | 64 bit RISC-V Open ISA|
2018-12-11 07:14:41 +08:00
| rl78 | Renesas RL78 |
2018-11-22 19:49:45 +08:00
| rx | Renesas RX 32 bit MCU |
| s390x | IBM zSystem s390x |
2018-08-01 00:14:54 +08:00
| sparc | 32 bit SPARC |
2018-06-01 19:31:38 +08:00
| sparc64 | SPARC v9 processor |
2018-11-22 19:49:45 +08:00
| x86 | 32 bit x86 processor |
| x86_64 | 64 bit x86 processor |
2017-09-17 00:16:00 +08:00
Any cpu family not listed in the above list is not guaranteed to
remain stable in future releases.
2018-10-03 01:14:21 +08:00
Those porting from autotools should note that meson does not add
endianness to the name of the cpu_family. For example, autotools
will call little endian PPC64 "ppc64le", meson will not, you must
also check the `.endian()` value of the machine for this information.
2017-09-17 00:16:00 +08:00
## Operating system names
These are provided by the `.system()` method call.
| Value | Comment |
| ----- | ------- |
2017-11-17 20:58:05 +08:00
| cygwin | The Cygwin environment for Windows |
2018-11-22 19:49:45 +08:00
| darwin | Either OSX or iOS |
2017-12-19 08:25:40 +08:00
| dragonfly | DragonFly BSD |
2018-11-22 19:49:45 +08:00
| freebsd | FreeBSD and its derivatives |
2018-10-09 05:24:59 +08:00
| gnu | GNU Hurd |
2018-11-22 19:49:45 +08:00
| haiku | |
| linux | |
| netbsd | |
| windows | Any version of Windows |
2017-09-17 00:16:00 +08:00
Any string not listed above is not guaranteed to remain stable in
2017-11-21 08:59:21 +08:00
future releases.
2018-02-25 20:02:34 +08:00
## Language arguments parameter names
These are the parameter names for passing language specific arguments to your build target.
| Language | Parameter name |
2018-03-04 12:48:51 +08:00
| ----- | ----- |
2018-02-25 20:02:34 +08:00
| C | c_args |
| C++ | cpp_args |
| C# | cs_args |
| D | d_args |
| Fortran | fortran_args |
| Java | java_args |
| Objective C | objc_args |
| Objective C++ | objcpp_args |
| Rust | rust_args |
| Vala | vala_args |
2017-09-30 02:52:06 +08:00
2018-11-18 22:35:25 +08:00
## Compiler and linker flag environment variables
These environment variables will be used to modify the compiler and
linker flags.
| CFLAGS | Flags for the C compiler |
| CXXFLAGS | Flags for the C++ compiler |
| OBJCFLAGS | Flags for the Objective C compiler |
| FFLAGS | Flags for the Fortran compiler |
| DFLAGS | Flags for the D compiler |
| VALAFLAGS | Flags for the Vala compiler |
| RUSTFLAGS | Flags for the Rust compiler |
| LDFLAGS | The linker flags, used for all languages |
2017-09-30 02:52:06 +08:00
## Function Attributes
These are the parameters names that are supported using
`compiler.has_function_attribute()` or
`compiler.get_supported_function_attributes()`
2018-10-28 06:11:44 +08:00
### GCC `__attribute__`
2017-09-30 02:52:06 +08:00
These values are supported using the GCC style `__attribute__` annotations,
which are supported by GCC, Clang, and other compilers.
| Name |
|----------------------|
| alias |
| aligned |
| alloc_size |
| always_inline |
| artificial |
| cold |
| const |
| constructor |
| constructor_priority |
| deprecated |
| destructor |
| error |
| externally_visible |
| fallthrough |
| flatten |
| format |
| format_arg |
| gnu_inline |
| hot |
| ifunc |
| malloc |
| noclone |
| noinline |
| nonnull |
| noreturn |
| nothrow |
| optimize |
| packed |
| pure |
| returns_nonnull |
| unused |
| used |
| visibility |
| warning |
| warn_unused_result |
| weak |
| weakreaf |
### MSVC __declspec
These values are supported using the MSVC style `__declspec` annotation,
which are supported by MSVC, GCC, Clang, and other compilers.
| Name |
|----------------------|
| dllexport |
| dllimport |