I came across this "How to Write a Checker in 24 Hours - LLVM" by Anna Zaks and Jordan Rose.
I am using an Ubuntu/Debian system.
To build a custom checker, do I need to build llvm and clang from source?
Anybody knows how use the prebuilt clang and llvm from apt-get to build a checker?
Thanks.
You need to build clang/llvm from the source in order to be able to build a custom checker.
http://clang-analyzer.llvm.org/installation.html
When you write a new custom checker, you end up editing the checker related files to register your checker with clang, and recompile it. Which won't be possible with prebuilt executables. How to add your new checker: http://clang-analyzer.llvm.org/checker_dev_manual.html
Related
Well, I am going to do some deep learning stuff with opencv.
I have already installed scikit-image and scikit-learn.
No, but you could install some C++ compiler on MacOSX.
Visual C++ is a C++ compiler and IDE for Windows (don't confuse it with Visual Studio Code, which is a cross-platform IDE). You need some compiler for MacOSX, which is a Unix variant and nearly POSIX (it could be certified to some specific POSIX standard, but I don't know which).
Probably, both GCC and Clang are available on MacOSX (see this). You need to find some packaged version of them, perhaps with brew; both compilers work really well. Apple is partly funding Clang. GCC is funded by many other corporations. They both are open source compilers, but with a different license (GCC is mostly GPLv3+). GCC is probably producing some faster code (when optimizing, faster by a few percents only). Clang is probably giving better diagnostics. I actually recommend installing both of them (and using occasionally both of them too).
Take care to install recent versions of GCC & Clang. Both are very active projects, and are progressing quite well.
You probably need to install other things too. E.g. a build automation tool (like GNU make), a version control system (like git), a source code editor (like emacs or vim).
You might even install some fancy IDE like Clion, Code::Blocks, XCode, etc.. I recommend avoiding that, because you need to learn how to compile on the command line. These fancy tools are running the command line compiler under the hoods, and you really need to understand what they are doing (and hiding from you). Actually C and C++ are somehow not IDE friendly (you really need to understand what the compiler is doing). In both C11 specification (n1570) and in C++11 specification (n3337) the notion of translation unit and of preprocessing is important (and sadly, IDEs tend to hide these notions).
As remarked in comments, you could install the XCode package (which pulls useful packages like GCC or Clang, etc...), but avoid using the XCode IDE.
I'm trying to add lua static library onto my project using CMAKE. But what I found from lua documents that they have several version of Visual Studio libraries for 32/64-bit architecture.
I need to learn is there a option on CMAKE to identify the architecture and generator used for generating required files.
Thanks in advance
There's a host of system inspection variables and information variables which CMake offers. I'll try to list some which might be applicable in your case:
CMAKE_CL_64: true if the compiler being used is Microsoft's CL targetting a 64-bit architecture
MSVC: true if using a Miscrosoft Visual C++ compiler
CMAKE_GENERATOR: the generator being used
CMAKE_GENERATOR_PLATFORM: generator-specific target platform name
CMAKE_SIZEOF_VOID_P: size of void*, in bytes
You should also be aware that CMake ships with a FindLua module, so you might find the decision already implemented for you in that module. (I have never used it myself, so I do not now whether/how it works).
Is there any way to use stock mono and compile to iOs using --aot=full ?
I am aware of Xamarin, but I'm looking for a free solution, since I'm looking for an automated way to test some AOT-specific bugs in a FOSS project.
I know that Unity uses an executable mono-xcompiler in order to do that, but I couldn't find out how this executable is compiled from the mono code base.
Okay, I found the answer. You need to compile mono in cross-compilation mode. The configure arguments in my machine (64-bit Linux) were the following:
CFLAGS=-m32 ./configure --target=arm-darwin11 --host=i686-linux --enable-system-aot --with-sgen=no
We need to compile as 32-bit since mono cannot generate an ARM build from a 64-bit executable; Also, sgen was causing trouble with the TLS mode. It may be possible to overcome this, but I haven't found a way.
Another alternative might be to apply for an Open Source Project Xamarin license: http://resources.xamarin.com/open-source-contributor.html
I am looking for some handy code analysis tools for iOS projects, esp. to do static analysis, dynamic analysis and generate call graphs. In my investigation so far, I found
Dtrace as explained here and here
Clang as explained here
Doxygen as explained here
Are there any other open source tools available for my case that I miss? Also has anyone tried any of the above ones successfully for objective-c iOS projects?
Thanks
Are you not satisfied yet with the built-in XCode analyzer (Product > Analyze)?
The primary author of LLVM project and Clang now works at Apple as the Director of Developer Tools Department. He's primarily responsible in embedding Clang to XCode.
So, I believe the analyzer within XCode already an excellent tool that you need to do analysis on your iOS project.
I'm not sure if this question is correct but...
Ok, is possible compiled the source vala in vala
because I bean downloading vala source code and inside has many vala files
here vala release source code
https://wiki.gnome.org/Vala/Release
I have been installed on windows this version
https://code.google.com/p/vala-win32/downloads/list
vala-0.12.0.exe
I wont compile the last vala release whit the vala on windows
oky, gracias :D
please, not confused with this question,
Compiling a Vala source On Windows
If 0.20.1 is enough, you can use http://www.tarnyko.net/en/?q=node/35 and possibly avoid this whole thing.
If you really need 0.22.0, Vala release tarballs don't actually require valac to compile—they contain all the generated C. You should be able to use the build system included with Vala (like Robert Rozas mentioned, or via cygwin) to generate executables even without valac installed.
GNOME wiki recommends using either MSYS2 or WSL (Windows 10 only) to get Vala compiler. Another option is using ValaForWindows, which aims to be the easiest option to install and use.