Claim options which disable include paths in case the pre-processor is not run.
This avoids warnings when, for example, all inputs are objects. Libtool sometimes builds libraries and binaries this way.
Here's an obviously exaggerated example:
clang++ -c test.cpp -o test.o
clang++ -shared test.o -nobuiltininc -nostdinc -nostdlibinc -nostdinc++ -nogpuinc -nohipwrapperinc -ibuiltininc -o testing
clang-16: warning: argument unused during compilation: '-nobuiltininc' [-Wunused-command-line-argument]
clang-16: warning: argument unused during compilation: '-nostdinc' [-Wunused-command-line-argument]
clang-16: warning: argument unused during compilation: '-nostdlibinc' [-Wunused-command-line-argument]
clang-16: warning: argument unused during compilation: '-nostdinc++' [-Wunused-command-line-argument]
clang-16: warning: argument unused during compilation: '-nogpuinc' [-Wunused-command-line-argument]
clang-16: warning: argument unused during compilation: '-nohipwrapperinc' [-Wunused-command-line-argument]
clang-16: warning: argument unused during compilation: '-ibuiltininc' [-Wunused-command-line-argument]
These cflags/cxxflags are very often inadvertently passed as part of the link-line, making the warnings annoying (and problematic with -Werror). Most other path-related options are consumed, making the above outliers. If it makes sense for options like -isystem to be consumed, imo it makes sense for options which control those options to be consumed as well.
I'm not familiar with this code, so I largely guessed as to where they should be added.