aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Reference-tables.md
blob: 4657e17ee7b533d56e9e8cc65b48ecbecb486c01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# Reference tables

## Compiler ids

These are return values of the `get_id` method in a compiler object.

| Value     | Compiler family                |
| -----     | ----------------               |
| gcc       | The GNU Compiler Collection    |
| clang     | The Clang compiler             |
| msvc      | Microsoft Visual Studio        |
| intel     | Intel compiler                 |
| llvm      | LLVM-based compiler (Swift, D) |
| mono      | Xamarin C# compiler            |
| dmd       | D lang reference compiler      |
| rustc     | Rust compiler                  |
| valac     | Vala compiler                  |
| pathscale | The Pathscale Fortran compiler |
| pgi       | The Portland Fortran compiler  |
| sun       | Sun Fortran compiler           |
| g95       | The G95 Fortran compiler       |
| open64    | The Open64 Fortran Compiler    |
| nagfor    | The NAG Fortran compiler       |
| lcc       | Elbrus C/C++/Fortran Compiler  |
| arm       | ARM compiler                   |
| armclang  | ARMCLANG compiler              |

## Script environment variables

| Value               | Comment                         |
| -----               | -------                         |
| MESON_SOURCE_ROOT   | Absolute path to the source dir |
| MESON_BUILD_ROOT    | Absolute path to the build dir  |
| 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. |
| MESON_SUBDIR        | Current subdirectory, only set for `run_command` |
| MESON_DIST_ROOT     | Points to the root of the staging directory, only set when running `dist` scripts |


## 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                         |
| -----               | -------                         |
| x86                 | 32 bit x86 processor  |
| x86_64              | 64 bit x86 processor  |
| ia64                | Itanium processor     |
| arm                 | 32 bit ARM processor  |
| arc                 | 32 bit ARC processor  |
| aarch64             | 64 bit ARM processor  |
| mips                | 32 bit MIPS processor |
| mips64              | 64 bit MIPS processor |
| ppc                 | 32 bit PPC processors |
| ppc64               | 64 bit PPC processors |
| e2k                 | MCST Elbrus processor |
| parisc              | HP PA-RISC processor  |
| riscv32             | 32 bit RISC-V Open ISA|
| riscv64             | 64 bit RISC-V Open ISA|
| sparc               | 32 bit SPARC          |
| sparc64             | SPARC v9 processor    |
| s390x               | IBM zSystem s390x     |

Any cpu family not listed in the above list is not guaranteed to
remain stable in future releases.

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.

## Operating system names

These are provided by the `.system()` method call.

| Value               | Comment                         |
| -----               | -------                         |
| linux               | |
| darwin              | Either OSX or iOS |
| windows             | Any version of Windows |
| cygwin              | The Cygwin environment for Windows |
| haiku               | |
| freebsd             | FreeBSD and its derivatives |
| dragonfly           | DragonFly BSD |
| netbsd              | |
| gnu                 | GNU Hurd |

Any string not listed above is not guaranteed to remain stable in
future releases.


## Language arguments parameter names

These are the parameter names for passing language specific arguments to your build target.

| Language      | Parameter name |
| -----         | ----- |
| 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 |


## Function Attributes

These are the parameters names that are supported using
`compiler.has_function_attribute()` or
`compiler.get_supported_function_attributes()`

### GCC __attribute__

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            |