1

I'm using armcc/gcc for a code base that contains large header files (>20MB hardware CSR files). I want to be able to detect any file that includes this large header file, since I'm trying to root-cause my super-slow build.

Is there an option I could use in one of these compilers to warn me about the size of a file (including the size of the headers that it might be including)?

sdmello
  • 431
  • 2
  • 6
  • 14

1 Answers1

3

You can put to your large header file:

#warning This large header is included

Then in every translation unit you'll get a compiller (GCC) warning message pointing you to what source file has that header included (directly or indirectly).

dmi
  • 1,424
  • 1
  • 9
  • 9