File tree 1 file changed +25
-1
lines changed
1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ as it can result in unexpected errors during your project's build process.
258
258
Cross-building for Apple and Android
259
259
-------------------------------------
260
260
261
- The ``MesonToolchain `` adds all the flags required to cross-compile for Apple (MacOS M1, iOS, etc.) and Android.
261
+ The ``MesonToolchain `` generator adds all the flags required to cross-compile for Apple (MacOS M1, iOS, etc.) and Android.
262
262
263
263
**Apple **
264
264
@@ -282,6 +282,30 @@ in this example of host profile:
282
282
[conf]
283
283
tools.apple:sdk_path=/my/path/to/iPhoneOS.sdk
284
284
285
+
286
+ Cross-building and native=true
287
+ ------------------------------
288
+
289
+ New since `Conan 2.3.0 <https://github.com/conan-io/conan/releases/tag/2.3.0 >`__
290
+
291
+ When you are cross-building, sometimes you need to build a tool which is used to generate source files.
292
+ For this you would want to build some targets with the system's native compiler. Then, you need Conan to create both
293
+ context files:
294
+
295
+ .. code :: python
296
+
297
+ def generate (self ):
298
+ tc = MesonToolchain(self )
299
+ tc.generate()
300
+ # Forcing to create the native context too
301
+ if cross_building(self ):
302
+ tc = MesonToolchain(self , native = True )
303
+ tc.generate()
304
+
305
+ See also `this reference <https://mesonbuild.com/Cross-compilation.html#mixing-host-and-build-targets >`__
306
+ from the Meson documentation for more information.
307
+
308
+
285
309
Objective-C arguments
286
310
++++++++++++++++++++++
287
311
You can’t perform that action at this time.
0 commit comments