labath requested changes to this revision.
labath added a comment.
This revision now requires changes to proceed.

I don't think this should be necessary. Based on my experiments, the fact 
whether clang-cl defines `char32_t` depends on the version of visual studio it 
is emulating (`-fms-compatibility-version`). For instance I can do this:

  $ cat /tmp/a.cc 
  char32_t XX;
  $ bin/clang-cl /tmp/a.cc /GS- /GR- /c -fms-compatibility-version=18
  /tmp/a.cc(1,1) :  error: unknown type name 'char32_t'
  char32_t XX;
  ^
  1 error generated.
  $ bin/clang-cl /tmp/a.cc /GS- /GR- /c -fms-compatibility-version=19
  $ bin/clang-cl /tmp/a.cc /GS- /GR- /c

So, what I suspect is happening is that clang uses %VCINSTALLDIR% to detect the 
MSVC version, and then sets the compatibility based on that. If the detected 
version is high enough, `char32_t` will be automatically defined. The 
interesting part is that, for me, the default version seems to be high enough 
that even without any special setting `char32_t` "just works". However, I'm on 
linux, so the differences could be due to that.

So I think this is good news. I hope all that's needed here is to get 
`build.py` to add the -fms-compatibility thingy and things should work. Until 
we actually need to vary this version, I think we can just unconditionally add 
that flag to all clang-cl invocations in build.py.


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57809/new/

https://reviews.llvm.org/D57809



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to