[cfe-users] Recipe for cross compiling from x86 to AArch64?
Hi, Following instructions written at: https://llvm.org/docs/HowToCrossCompileLLVM.html ends up with: [ 57%] Building arm_neon.h... /bin/sh: ../../../../bin/clang-tblgen: cannot execute binary file make[2]: *** [tools/clang/lib/Headers/arm_neon.h] Error 126 make[1]: *** [tools/clang/lib/Headers/CMakeFiles/clang-resource-headers.dir/all] Error 2 make: *** [all] Error 2 I believe there's no easy way for us to build clang-tblgen, so I am stuck right here. ___ cfe-users mailing list cfe-users@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
Re: [cfe-users] [cfe-dev] clang-format single line if
Done. https://bugs.llvm.org/show_bug.cgi?id=43913 On Mon, Nov 4, 2019 at 3:36 AM MyDeveloper Day wrote: > Could I ask you to log a defect over in https://bugs.llvm.org to this > effect, The examples using AllowShortIfStatementsOnASingleLine don't > include braces > > MyDeveloperDay > > On Sun, Nov 3, 2019 at 8:51 PM Michael Pozulp via cfe-dev < > cfe-...@lists.llvm.org> wrote: > >> If I build clang-format from tip of master and run it >> using this .clang-format file >> >> AllowShortIfStatementsOnASingleLine: Always >> >> it will change this single line if statement >> >> if (x) { x++; } >> >> into this three line if statement >> >> if (x) { >> x++; >> } >> >> How do I keep it as one line? >> >> If I delete the braces it stays on one line, but the >> style guide for the code I work on says the braces are >> required. If I modify my .clang-format file to be >> >> AllowShortIfStatementsOnASingleLine: Always >> AllowShortBlocksOnASingleLine: Always >> >> it stays on one line, but I don't want all short blocks >> on a single line, just the if statement block. Any ideas? >> ___ >> cfe-dev mailing list >> cfe-...@lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev >> > ___ cfe-users mailing list cfe-users@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
Re: [cfe-users] [cfe-dev] clang-format single line if
Could I ask you to log a defect over in https://bugs.llvm.org to this effect, The examples using AllowShortIfStatementsOnASingleLine don't include braces MyDeveloperDay On Sun, Nov 3, 2019 at 8:51 PM Michael Pozulp via cfe-dev < cfe-...@lists.llvm.org> wrote: > If I build clang-format from tip of master and run it > using this .clang-format file > > AllowShortIfStatementsOnASingleLine: Always > > it will change this single line if statement > > if (x) { x++; } > > into this three line if statement > > if (x) { > x++; > } > > How do I keep it as one line? > > If I delete the braces it stays on one line, but the > style guide for the code I work on says the braces are > required. If I modify my .clang-format file to be > > AllowShortIfStatementsOnASingleLine: Always > AllowShortBlocksOnASingleLine: Always > > it stays on one line, but I don't want all short blocks > on a single line, just the if statement block. Any ideas? > ___ > cfe-dev mailing list > cfe-...@lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev > ___ cfe-users mailing list cfe-users@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
Re: [cfe-users] Clang9 UBSan and GMP
> On 2 Nov 2019, at 02:36, Matthew Fernandez > wrote: > >> Both GCC and Clang can be conveniently installed using MacPorts. The Apple >> inhouse clang is weird. > > I haven’t followed the rest of this thread closely, but do you have a > reference for the GMP developers abandoning Clang on macOS? Or were you > referring to their comment about Clang on the page I linked? Personally I > regularly use GMP with a macOS-supplied Clang without any issues. Admittedly > not for any extreme numerical computation, but my experience is that GMP > works fine in this scenario. It was reported on the GMP developer list that 'make check’ failed for the Apple inhouse Clang, and the developers suggested using GCC instead, which however was not available at that time on MacOS 10.15. So I called it “not supported” meaning that they do not actively work on handling such issues, though it may still work. If you have worries for accuracy, you might compile the GMP library using GCC, or turning off optimization with Clang. ___ cfe-users mailing list cfe-users@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
[cfe-users] Support for specific Java versions
Hi, currently I'm looking for a Java SourceCode formatter which can be integrated into the Eclipse-IDE and also run as standalone application. The development department of my company needs a fixed source code formatting, as we experienced formatter changes during every Eclipse-IDE update. We are already using clang-format for our C++ SourceCode base and as clang-format supports also Java, we wanted to evaluate it. Currently our Java SourceCode is Java8 compliant, but I have some questions regarding clang-format and the supported Java language features: * Which Java version does clang-format support currently and is the support for a specific Java version built into the clang-format library/executable or the .clang style? * Does clang-format already support language features of Java9+? * How does the current clang-format formatter handle SourceCode which contains language features which it does not know about? Let's say for example clang-format supports Java8 but we use Java9 or Java10 with new language features? o Does it leave the area of the source code unformatted and continues with the remaining content of the source file or o Can't it handle new language features at all and leaves the whole file unformatted? I hope you can help me with this questions. Best regards, Ahmet Bilgin MAGMA Gie?ereitechnologie Gesellschaft f?r Gie?erei-, Simulations- und Regeltechnik mbH | Kackertstr. 11, 52072 Aachen, Germany | Rechtsform GmbH, Amtsgericht Aachen HRB 3912, UST-ID-Nr. DE121745780 | Gesch?ftsf?hrung: Dr. Marc C. Schneider (Vorsitzender), Dr.-Ing. J?rg C. Sturm [https://www.magmasoft.de/export/shared/magma_mail.jpg] ___ cfe-users mailing list cfe-users@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
Re: [cfe-users] Clang compilation options to solve the comaptible issue?
I just saw the mail today. It archived by gmail in the Sent folder. Thanks for the helpful response. On Mon, Nov 4, 2019 at 1:48 AM Richard Smith wrote: > On Thu, 31 Oct 2019 at 01:45, Guofeng Zhang via cfe-users < > cfe-users@lists.llvm.org> wrote: > >> Hi, >> >> I just stat using clang 8 not long ago. I need to compile our old c++ >> source without changing it. It is compiled with Visual Studio before. Now I >> want to migrate to clang as the compiler. >> >> The following code segement can be compiled by clang: >> >> 1) for (int i = 0 ; i < 6 ; i++ ) { >> >> } >> int k = i ; // compiler error >> > > This code is relying on pre-standard C++ for loop scoping behavior (the > code has been invalid for all 21 years of standard C++). Clang does not > support this pre-standard behavior. > > >> 2) unsigned short *s = >> wchar_t *t = s ; // compiler error >> >> I tried -ffor-scope and -fshort-wchar, but does not solve the issues. >> >> are there clang compilation options to solve the issues? >> > > For the latter, something like "-Dwchar_t=unsigned short" might mostly > work. (It won't support things like "wchar_t x = wchar_t(123);" though -- > to support that you could put "typedef unsigned short my_wchar_t; #define > wchar_t my_wchar_t" into a -include'd header.) > > Generally. if you have the combination of ancient pre-standard C++ code > that is invalid under any ISO C++ standard, and a requirement that you do > not modify the code, you're going to have problems. Sorry. That said, Clang > itself is open-source and modifiable, and it should be straightforward to > add support for the above two constructs to Clang and build your own > compiler that could perhaps accept this code. I'm not sure we'd want to > accept patches for those non-standard behaviors upstream, though. > > Thanks for your help very much, >> >> Guofeng >> ___ >> cfe-users mailing list >> cfe-users@lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users >> > ___ cfe-users mailing list cfe-users@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users