Changeset 367853f
- Timestamp:
- 03/30/2019 10:51:46 PM (4 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 9.0, 9.1, ken/inkscape-core-mods, lazarus, plabs/python-mods, qt5new, trunk, upgradedb, xry111/intltool, xry111/soup3, xry111/test-20220226
- Children:
- 178639f
- Parents:
- ba31c2b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
introduction/important/building-notes.xml
rba31c2b r367853f 460 460 There are now three different build systems in common use for 461 461 converting C or C++ source code into compiled programs or 462 libraries ,and their details (particularly, finding out about available462 libraries and their details (particularly, finding out about available 463 463 options and their default values) differ. It may be easiest to understand 464 the issues caused by some choices (typically , slow execution,or465 unexpected use of, or omission of, optimizatons) by starting with the item466 which drew attention to this, the CFLAGS and CXXFLAGS.464 the issues caused by some choices (typically slow execution or 465 unexpected use of, or omission of, optimizatons) by starting with 466 the CFLAGS and CXXFLAGS environment variables. 467 467 </para> 468 468 … … 470 470 Most LFS and BLFS builders are probably aware of the basics of CFLAGS 471 471 and CXXFLAGS for altering how a program is compiled. Typically, some 472 form of optimization is used for a released program(-O2 or -O3),473 sometimes with the creation of debug symbols (-g) when using -O2.472 form of optimization is used by upstream developers (-O2 or -O3), 473 sometimes with the creation of debug symbols (-g), as defaults. 474 474 </para> 475 475 … … 477 477 If there are contradictory flags (e.g. multiple different -O values), 478 478 the <emphasis>last</emphasis> value will be used. Sometimes this means 479 that flags specified iin environment variables will be picked up before479 that flags specified in environment variables will be picked up before 480 480 values hardcoded in the Makefile, and therefore ignored. For example, 481 481 where a user specifies '-O2' and that is followed by '-O3' the build will … … 495 495 </para> 496 496 497 <bridgehead renderas="sect3" >Autotools with Make</bridgehead>497 <bridgehead renderas="sect3" id="autotools-info">Autotools with Make</bridgehead> 498 498 499 499 <para> … … 504 504 505 505 <para> 506 Sometimes ,running <command>./configure --help</command> will produce506 Sometimes running <command>./configure --help</command> will produce 507 507 useful options about switches which might be used. At other times, 508 after looking at the output from a run ofconfigure you may need to look508 after looking at the output from configure you may need to look 509 509 at the details of the script to find out what it was actually searching 510 510 for. … … 516 516 any flags which would otherwise be used (<emphasis>variously</emphasis>: 517 517 ignored, used to replace the programmer's suggestion, used before the 518 programmer's suggestion, used after the programmer's suggestion).518 programmer's suggestion, or used after the programmer's suggestion). 519 519 </para> 520 520 … … 528 528 </para> 529 529 530 <bridgehead renderas="sect3" >CMake</bridgehead>530 <bridgehead renderas="sect3" id="cmake-info">CMake</bridgehead> 531 531 532 532 <para> … … 548 548 of CMAKE_BUILD_TYPE values, and these affect the flags. The default 549 549 is that this is not set and no flags are generated. Any CFLAGS or 550 CXXFLAGS in the environment will be used. If 550 CXXFLAGS in the environment will be used. If the programmer has coded 551 551 any debug assertions, those will be enabled unless -DNDEBUG is used. 552 552 The following CMAKE_BUILD_TYPE values will generate the flags shown, … … 575 575 </para> 576 576 577 <bridgehead renderas="sect3" >Meson</bridgehead>577 <bridgehead renderas="sect3" id="meson-info">Meson</bridgehead> 578 578 579 579 <para> 580 580 Meson has some similarities to CMake, but many differences. To get 581 details of the definesthat you may wish to change is slightly involved 582 using meson-0.49.2: 583 </para> 584 585 <screen><userinput>meson .. 581 details of the defines that you may wish to change ypu need to do: 582 </para> 583 584 <screen><userinput>mkdir build 585 cd build 586 meson .. 586 587 meson configure | less</userinput></screen> 587 588 588 589 <para> 589 After identifying what to set, meson then needs to be reconfigured: 590 </para> 591 592 <screen><userinput>meson --prefix=/usr -Dsome_option=true -Dother_option=false --reconfigure</userinput></screen> 590 After identifying what to set, meson then needs to be reconfigured. 591 For example: 592 </para> 593 594 <screen><userinput>meson --prefix=/usr -Dbuildtype=<type> -Dother_option=false --reconfigure</userinput></screen> 593 595 594 596 <para> 595 597 Alternatively, you could remove the build directory where you did this, 596 recreate it, and then run meson with the desired switches.598 recreate it, and then run meson with the desired options. 597 599 </para> 598 600 … … 622 624 623 625 <para> 624 Although the releasebuildtype is described as enabling -DNDEBUG, and all626 Although the 'release' buildtype is described as enabling -DNDEBUG, and all 625 627 CMake Release builds pass that, it has so far only been observed (in 626 628 verbose builds) for <xref linkend="mesa"/>. That suggests that it might … … 635 637 <para> 636 638 To see the details of the commands which are being run in a package using 637 meson, againuse 'ninja -v'.639 meson, use 'ninja -v'. 638 640 </para> 639 641
Note:
See TracChangeset
for help on using the changeset viewer.