5 ms·
Come guys, just use clang! It's state of the art, all the tooling already exists, and its under a very permission license (http://clang.llvm.org/features.html#
by shadowmint 11y ago
Come guys, just use clang!
It's state of the art, all the tooling already exists, and its under a very permission license (http://clang.llvm.org/features.html#license http://clang.llvm.org/features.html#license).
You don't need to rewrite all of these tools.
/me shakes head.
- topbanana 11y agoCompetition is good
- mynegation 11y agoHave you ever been supporting a large C++ code base to be compiled both by MS VC++ and gcc (or clang)? It's not too bad, but you are constantly working around minor incompatibilities and different levels of language support, time that could be productively spent elsewhere. I agree that competition is good, I'd much rather prefer compilers competing on the speed, quality of their optimization, static analysis, supported platforms - something that does not give me much of a headache. Having said that, I acknowledge that MS compiler team made great progress in the recent year catching up on C++ standards, compatibility, and compilation speed.
- pjmlp 11y ago> Have you ever been supporting a large C++ code base to be compiled both by MS VC++ and gcc (or clang)? It's not too bad, but you are constantly working around minor incompatibilities and different levels of language support, time that could be productively spent elsewhere. That is what happens to any technology based on standards instead of gold implementation. Lets have one OS, one browser, one compiler, ....
- flohofwoe 11y agoCan't speak for the parent, but all code I work on professionally or for personal projects compiles cleanly on GCC, clang and VC (all in all about 2 million lines of code). I think it is good for code quality to compile on different compilers, since they all catch different bugs through their warnings and static code analyzers. For this I can forgive minor inconviniences like that VC doesn't fully support C++11, or that clang on iOS doesn't support std::thread_local, or (as a random example that I stumbled upon) that the GCC version I am locked to doesn't have full support for variadic templates as lambda arguments, etc... all compilers have their little problems and corner cases, it would be worse to lose one of the big three compilers.
- bluecalm 11y agoMaybe they would compete on: >>the speed, quality of their optimization, static analysis, supported platforms if the C++ committee wasn't that "prolific" about adding yet new ways to do the same thing to the language. It sucks a lot of resources to implement that monstrosity and every 3 years or so there is a new set of toys to play with.
- GFK_of_xmaspast 11y agoThere were 8 years between c++03 and c++11, and in terms of substantial changes to the language you have to go back to c++98.
- cwyers 11y agoThey're not rewriting all of these tools, they're improving their tool that prexists Clang. Now, I know that's quibbling, but this really isn't: What do you think is less work and less risk for Microsoft: throwing enough resources at MVCC to make it better, or throwing enough resources at Clang to make it so that Windows and Office compile on it without introducing regressions?
- ddengster 11y agois there a llvm/clang integration for visual studio yet?
- ygra 11y agoYes. Integrates as platform toolset in the project files, which is the same mechanism you can use to change compilers between those VS provides.
- claudius 11y ago> It's state of the art Does the officially released version support OpenMP by now? A few weeks ago at least I still failed at installing that properly from official sources. There seems to be an OpenMP-in-clang project going on, but it was far from obvious what had to go where. So about this “state of the art”…
- TillE 11y agoIt took them forever, but yes, they support OpenMP 3.1 as of clang 3.7. MSVC still only supports OpenMP 2.0.
- bluecalm 11y agoThanks for the information. I must be doing something wrong then as I've recently downloaded 3.7.0 for Windows and while it compiles with -fopenmp it doesn't work correctly (only one thread is launched). I guess some investigation is needed, any ideas why that could be? The code works correctly when compiled with GCC so that can't be an issue. I am launching OpenMP threads from a Windows thread (not the main one) so maybe that's the issue (MinGW packages had problems with it forever and it's pretty tough to find one without this bug present).
- claudius 11y agoThis: ./clang++ --version clang version 3.8.0 (trunk 246030) Target: x86_64-unknown-linux-gnu Thread model: posix does not support OpenMP to my knowledge.
- gopowerranger 11y agoYou have to enable it using -fopenmp http://blog.llvm.org/2015/05/openmp-support_22.html http://blog.llvm.org/2015/05/openmp-support_22.html http://clang-omp.github.io/ http://clang-omp.github.io/
- claudius 11y agoHmm, interesting. It works in a simple test case, but fails to compile my codebase and throws an error ./inc/bla.h:163:9: error: unexpected '#pragma omp ...' in program [-Werror,-Wsource-uses-openmp] #pragma omp parallel for num_threads(Threading::num), schedule(dynamic, 1) Unfortunately I wasn’t able to build a minimally failing example so far, I will have to investigate this further. Thanks for the heads-up in any case! Edit: Turns out everything fails if -Weverything is supplied. I didn’t offer a runtime library (nor did the compiler define the _OPENMP macro even when having -fopenmp on the command line, otherwise it would have complained about a missing <omp.h>…). If -Weverything is not there, the thing compiles but only runs with one thread.
- izacus 11y agoIt's so state of the art it currently can't even generate profiling data on ARM devices.