mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
docs/meson: Recommend not using CFLAGS and friends
Because of the many caveats involved, using -Dc_args instead of CFLAGS is recommended both by meson upstream and by us. v2: - Fix typo Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> (v1) Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
9606310081
commit
0ff7eed289
1 changed files with 7 additions and 7 deletions
|
|
@ -110,14 +110,14 @@ to invoke non-default targets for ninja to update them:
|
|||
<dl>
|
||||
<dt><code>Environment Variables</code></dt>
|
||||
<dd><p>Meson supports the standard CC and CXX environment variables for
|
||||
changing the default compiler, and CFLAGS, CXXFLAGS, and LDFLAGS for setting
|
||||
options to the compiler and linker during the initial configuration.
|
||||
changing the default compiler. Meson does support CFLAGS, CXXFLAGS, etc. But
|
||||
their use is discouraged because of the many caveats in using them. Instead it
|
||||
is recomended to use <code>-D${lang}_args</code> and
|
||||
<code>-D${lang}_link_args</code> instead. Among the benefits of these options
|
||||
is that they are guaranteed to persist across rebuilds and reconfigurations.
|
||||
|
||||
These arguments are consumed and stored by meson when it is initialized. To
|
||||
change these flags after the build is initialized (or when doing a first
|
||||
initialization), consider using <code>-D${lang}_args</code> and
|
||||
<code>-D${lang}_link_args</code> instead. Meson will never change compiler in a
|
||||
configured build directory.
|
||||
Meson does not allow changing compiler in a configured builddir, you will need
|
||||
to create a new build dir for a different compiler.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue