By default, the functions declared in standard library headers are treated as ordinary functions by the compiler. However, some of those functions can be recognized as “intrinsic” or “built-in” by the compiler. When treated as a built-in, the compiler can generate more efficient code. For example, the compiler can recognize that some functions have no side effects, and always return the same output given the same input. Some functions can be generated inline directly by the compiler. See the er_src(1) man page for an explanation of how to read compiler commentary in object files to determine for which functions the compiler actually makes a substitution.
The -xbuiltin=%all option asks the compiler to recognize as many of the built-in standard functions as possible. The exact list of recognized functions varies with the version of the compiler code generator.
The -xbuiltin=%none option results in the default compiler behavior, and the compiler does not do any special optimizations for built-in functions.
If the -xbuiltin option is not specified, then the compiler assumes -xbuiltin=%none.
If only -xbuiltin is specified, then the compiler assumes -xbuiltin=%all.
The expansion of the macro -fast includes -xbuiltin=%all.
The following compiler command requests special handling of the standard library calls.
example% CC -xbuiltin -c foo.cc
The following compiler command request that there be no special handling of the standard library calls. Note that the expansion of the macro -fast includes -xbuiltin=%all.
example% CC -fast -xbuiltin=%none -c foo.cc