@@ -53,6 +53,11 @@ corresponding build flags like ``-stdlib=libstdc++``, ``-std=gnu14``, architectu
53
53
etc. It will also append the folder where the Conan generators are located to the
54
54
``PKG_CONFIG_PATH `` environment variable.
55
55
56
+ Since `Conan 2.4.0 <https://github.com/conan-io/conan/releases/tag/2.4.0 >`__,
57
+ in a cross-building context, the environment variables ``CC_FOR_BUILD `` and ``CXX_FOR_BUILD `` are also set if the
58
+ build profile defines the ``c `` and ``cpp `` values in the configuration variable ``tools.build:compiler_executables ``.
59
+ See more info in the :ref: `conf section<conan_tools_gnu_autotoolstoolchain_conf> `.
60
+
56
61
This generator will also generate a file called ``conanbuild.conf `` containing two keys:
57
62
58
63
- **configure_args **: Arguments to call the ``configure `` script.
@@ -241,12 +246,11 @@ Reference
241
246
:members:
242
247
243
248
249
+ .. _conan_tools_gnu_autotoolstoolchain_conf :
244
250
245
251
conf
246
252
^^^^
247
253
248
- .. _conan_tools_gnu_autotoolstoolchain_conf :
249
-
250
254
- ``tools.build:cxxflags `` list of extra C++ flags that will be used by ``CXXFLAGS ``.
251
255
- ``tools.build:cflags `` list of extra of pure C flags that will be used by ``CFLAGS ``.
252
256
- ``tools.build:sharedlinkflags `` list of extra linker flags that will be used by ``LDFLAGS ``.
259
263
compiler as key and the compiler executable path as value. Those keys will be mapped as
260
264
follows:
261
265
262
- * ``c ``: will set ``CC `` in *conanautotoolstoolchain.sh|bat * script.
263
- * ``cpp ``: will set ``CXX `` in *conanautotoolstoolchain.sh|bat * script.
266
+ * ``c ``: will set ``CC `` (and ``CC_FOR_BUILD `` if cross-building) in *conanautotoolstoolchain.sh|bat * script.
267
+ * ``cpp ``: will set ``CXX `` (and ``CXX_FOR_BUILD `` if cross-building) in *conanautotoolstoolchain.sh|bat * script.
268
+ * ``rc ``: will set ``RC `` in *conanautotoolstoolchain.sh|bat * script.
264
269
* ``cuda ``: will set ``NVCC `` in *conanautotoolstoolchain.sh|bat * script.
265
270
* ``fortran ``: will set ``FC `` in *conanautotoolstoolchain.sh|bat * script.
266
271
0 commit comments