1.56 -nostdlibinc

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

If you want to disable the use of the Arm standard library, then use 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
Non-ConfidentialPDF file icon PDF version100067_0609_00_en
Copyright © 2014–2017 Arm Limited (or its affiliates). All rights reserved.