We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, I tried to use compile option pch (Precompiled Header) for compile time optimization.
But it seems like armclang (ARM compiler version 6) doesn't support --pch options.
Is there any way to use pch option in armclang? If not, is there any recommended armclang options for compile time optimization?
Hello James,
I found this in some very old documentation for the compiler:https://developer.arm.com/documentation/100066/0600/Compiling-C-and-C---Code/Using-PCH-files-to-reduce-compile-time
and it appears to still work in the latest (6.19) compiler release, at least with a simple test case I tried:
armclang --target=arm-arm-none-eabi -mcpu=cortex-m3 -x c-header my_header.h -o my_header.h.pch armclang --target=arm-arm-none-eabi -mcpu=cortex-m3 -c -g foo.c -include my_header.h
I don't find it mentioned in the latest documentation, but it seems to be a standard feature of clang (from which armclang is derived):https://clang.llvm.org/docs/UsersManual.html#using-a-pch-file
Regards, Ronan
Thanks Ronan :)