[PATCH] D20136: Get default -fms-compatibility-version from cl.exe's version

Adrian McCarthy via cfe-commits cfe-commits at lists.llvm.org
Tue May 10 16:31:37 PDT 2016


amccarth marked 4 inline comments as done.

================
Comment at: lib/Driver/MSVCToolChain.cpp:478
@@ +477,3 @@
+
+  const DWORD VersionSize = ::GetFileVersionInfoSizeW(ClExeWide.c_str(),
+                                                      nullptr);
----------------
Yes, it looks in the executable (which I tried to emphasize with the method name).

I don't think this is very expensive given that Explorer often makes zillions of such calls, but I'm open to other suggestions.

I know that you can't use a library that's newer than the compiler (because it may use new language features), but I don't know if that applies in the other direction or how we would safely and reliably map directory names to library versions and therefore to compiler versions.


http://reviews.llvm.org/D20136





More information about the cfe-commits mailing list