clang: Large number of include paths crashes clang

Hi team,

When the number of include paths specified using –I option or –include option is huge, the length of the command built becomes huge and at some point it exceeds the maximum length of the command allowed by shell/DOS/windows.

e.g. On windows if the command length exceeds about 32767 chars (if I am not wrong) the command is half built and becomes invalid.

Is there any way by which we can handle this issue?


Sujit Kamthe


Productivity & FE | Automotive and Engineering SBU | KPITCummins Infosystems Ltd|Board: +91 20 66525000 | Extn:3102 |Mobile:7709076120

You can use response file. Basically put all your command line options in a file, then use @file_name in your clang command line.