How to affect Delphi XEx code generation for Android/ARM targets?

Update 2017-05-17. I no longer work for the company where this question originated, and do not have access to Delphi XEx. While I was there, the problem was solved by migrating to mixed FPC+GCC (Pascal+C), with NEON intrinsics for some routines where it made a difference. (FPC+GCC is highly recommended also because it enables using … Read more

Switching between GCC and Clang/LLVM using CMake

I have a number of projects built using CMake and I’d like to be able to easily switch between using GCC or Clang/LLVM to compile them. I believe (please correct me if I’m mistaken!) that to use Clang I need to set the following: SET (CMAKE_C_COMPILER “/usr/bin/clang”) SET (CMAKE_C_FLAGS “-Wall -std=c99”) SET (CMAKE_C_FLAGS_DEBUG “-g”) SET … Read more

What exactly is LLVM?

I keep hearing about LLVM all the time. It’s in Perl, then it’s in Haskell, then someone uses it in some other language? What is it? What exactly distinguishes it from GCC (perspectives = safety etc.)? 7 s 7 LLVM is a library that is used to construct, optimize and produce intermediate and/or binary machine … Read more

Does the C++ standard allow for an uninitialized bool to crash a program?

I know that an “undefined behaviour” in C++ can pretty much allow the compiler to do anything it wants. However, I had a crash that surprised me, as I assumed that the code was safe enough. In this case, the real problem happened only on a specific platform using a specific compiler, and only if … Read more