On Fri, 8 Dec 2023 09:46:59 GMT, Daniel Jeliński <djelin...@openjdk.org> wrote:

> > Is it possible to fold clang-cl into the microsoft toolchain instead, and 
> > just pass clang-cl as the compiler instead of cl?
> 
> I suppose it's possible; clang-cl output is supposed to be compatible with 
> link & lib, and most command line options are similar.
> 
> The thing is, when it comes to warning control, only W0-W4 are somewhat 
> similar between clang-cl and microsoft; other than that, clang-cl accepts the 
> same options as the regular clang. Folding clang-cl into microsoft would 
> leave us with no way to suppress warnings.

My main concern is that this occludes clang proper, if and when that becomes a 
thing. If so, the clcl options might become a little redundant when compared 
with the existing clang option. Maybe there can be some specialized code to 
detect if microsoft is really clang-cl in disguise, or perhaps this could use 
the clang option that we already have in the build system, and then have 
--with-toolchain-type=clang mean either clang-cl or clang proper when the 
platform is Windows

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17019#issuecomment-1846906553

Reply via email to