You copied the Doc URL to your clipboard.


Tells the compiler to exclude the Arm® standard C and C++ library header files.


This option still searches the lib/clang/*/include directory.

If you want to disable the use of the Arm standard library, then use both the -nostdlibinc and -nostdlib armclang options.


-nostdlibinc is disabled by default.


#include "math.h" 

double foo(double d) 
    return sqrt(d + 1.0);
int main(int argc, char *argv[])
    return foo(argc);

Compiling this code without -nostdlibinc generates a call to __hardfp_sqrt, from the Arm standard library.

armclang --target=arm-arm-none-eabi -mcpu=Cortex-A9 -O0 -S -o- file.c -mfloat-abi=hard

Compiling this code with -nostdlibinc and -nostdlib generates an error because the compiler cannot include the standard library header file math.h.

armclang --target=arm-arm-none-eabi -mcpu=Cortex-A9 -O0 -S -o- file.c -mfloat-abi=hard -nostdlibinc -nostdlib