[llvm-dev] Compilation errors

Arno Bastenhof via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 30 23:36:00 PST 2015


Disclaimer: coming from a Java background where tools like Ant, Maven
and Gradle reign supreme, I'm rather new to make and CMake myself (not
to mention C and C++, which I've only started learning recently). So
take my words with a grain of salt. Nonetheless, you'll find my take
below:

The relevant lines, I would suppose, are

error: C++ style comments are not allowed in ISO C90 [-Werror]
 #endif // defined(_MSC_VER) && !defined(__clang__)

and

error: (this will be reported only once per input file) [-Werror]
cc1: all warnings being treated as errors

So, did you happen to have generated your make files using CMake
passing -DLLVM_ENABLE_WERROR=ON ?

My reasoning is as follows (but please do correct me if I'm wrong
somewhere): When generating your make file using cmake, since by
default LLVM_ENABLE_PEDANTIC is set to ON, the above warning gets
triggered (cf. the description of "pedantic" at
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html, assuming that
either you're building with gcc, or that Clang has the same
interpretation of "pedantic"). Again, by default, LLVM_ENABLE_WERROR
is set to OFF, so it should normally remain a warning.

On 12/1/15, Peter Teoh via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> While doing a make on the recently checkout version:
>
> I got the following errors:
>
> [ 68%] Built target dd
> [ 68%] Built target compiler-rt-headers
> [ 68%] Building C object
> projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/x86_64/floatdidf.c.o
> In file included from
> /home/tthtlc/llvm/llvm/projects/compiler-rt/lib/builtins/x86_64/floatdidf.c:9:0:
> /home/tthtlc/llvm/llvm/projects/compiler-rt/lib/builtins/x86_64/../int_lib.h:131:8:
> error: C++ style comments are not allowed in ISO C90 [-Werror]
>  #endif // defined(_MSC_VER) && !defined(__clang__)
>         ^
> /home/tthtlc/llvm/llvm/projects/compiler-rt/lib/builtins/x86_64/../int_lib.h:131:8:
> error: (this will be reported only once per input file) [-Werror]
> cc1: all warnings being treated as errors
> make[2]: ***
> [projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/x86_64/floatdidf.c.o]
> Error 1
> make[1]: ***
> [projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/all]
> Error 2
> make: *** [all] Error 2
>
> Can anyone comment on the error?
>
> --
> Regards,
> Peter Teoh
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>


More information about the llvm-dev mailing list