I have used the New Project wizard to create a console project, and choosing Clang 10.0.0 as the compiler.
(@oBFusCATed Clang++ is used as a linker as well as a compiler, though I am using the LLVM/Clang LLD.exe linker ).
I get this warning:
clang++: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
I don't choose -s as a build option, and it doesn't appear in the linker options (or other linker options).
In trying to trace another annoyance the -Weverything option (that is strongly unrecommended), I have found where looks like where this linker option is added.
C:\Program Files\CodeBlocks\share\CodeBlocks\templates\wizard\common_functions.script line 183
base.AddLinkerOption(_T("-s"));
This isn't a valid option for the LLD linker (or I believe the Clang++.exe linker) so it would be tidier to make this conditional on being GCC or not-Clang?
Should I try patching this line out on my copy of common_functions.script ?
Or can you suggest a better way for this?
(I at least can add the -s option by ticking the Compiler settings box "Strip all symbols from binary" if I am using GCC and care about .exe size - since I am just running tests, I usually care little).
Corrections.
1 I am using clang++.exe to get this message - because my compiler executables have clang++.exe for dynamic linking (and lld for static linking. (I might change this).
2 -s IS a clang++.exe
linkage command, but for reasons unclear to me the Clang warning system is triggered by -s even when it is in linking mode. So I conclude that this might be a Clang mis-feature?
I can disable the warning -Wno-unused-command-line-argument I suppose to suppress my 'no warnings' urges ;-)
So I think that I am wrong to suggest any CodeBlocks changes. Sorry for the noise.