1.41 -MP

Emits dummy dependency rules.

These rules work around make errors that are generated if you remove header files without a corresponding update to the makefile.


The -MP option only has an effect when used in conjunction with the -M, -MD, -MM, or -MMD options.


This example sends dependency rules to standard output, without compiling the source.

source.c includes a header file:

#include <stdio.h>

int main(void){
	puts("Hello world\n");
	return 0;

This first example is compiled without the -MP option, and results in a dependency rule for source.o:

armclang --target=aarch64-arm-none-eabi -mcpu=cortex-a53 -M source.c
source.o: source.c \

This second example is compiled with the -MP option, and results in a dependency rule for source.o and a dummy rule for the header file:

armclang --target=aarch64-arm-none-eabi -mcpu=cortex-a53 -M -MP source.c
source.o: source.c \

Non-ConfidentialPDF file icon PDF versionDUI0774J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.