It can also break software in some situations. Using -O3 does not guarantee that the software will perform better, and sometimes it can even slow down the program. This is undesired, as it deviates from the Arch Linux targeted optimization level. When using the common Release build type, it automatically appends the -O3 compiler optimization flag, and this overrides the default Arch Linux flag which currently is -O2 (defined in the makepkg configuration file). Some upstream projects even inadvertently include this option in their building instructions, but this produces an undesired behavior.Įach build type causes CMake to automatically append a set of flags to CFLAGS and CXXFLAGS. It is very common to see people running CMake with the -DCMAKE_BUILD_TYPE=Release option. Being such, some steps should be noted when writing PKGBUILDs for CMake-based software.ĬMake can automatically override the default compiler optimization flag The cmake command usually sets some parameters, checks for the needed dependencies and creates the build files, letting the software ready to be built by other tools like make and ninja.ĭue to its own internal characteristics for generating the build files, sometimes CMake can behave in undesired ways. The typical usage consists of running the cmake command and after that execute the building command.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |