Re: [cfe-users] How to detect LLVM Visual Studio Toolset on Windows?

2016-03-13 Thread Csaba Raduly via cfe-users
Hi Jeffrey,

Have you tried checking for __clang__ ?

On Sun, Mar 13, 2016 at 4:17 AM, Jeffrey Walton via cfe-users
 wrote:
> We took a bug report for LLVM Visual Studio Toolset on Windows. It
> appears LLVM defines _MSC_VER but it cannot consume the same programs
> that Microsoft's compilers can. We now have to figure out a way to
> detect Clang in this configuration and work around its shortcomings.
>
> The "Getting Started with the LLVM System using Microsoft Visual
> Studio" points us to the FAQ at http://llvm.org/docs/FAQ.html. The FAQ
> does not discuss how to detect the configuration or the preprocessor
> macros that are in effect.
>
> How do we detect LLVM Visual Studio Toolset on Windows?

Csaba

-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] When did Clang provide C++11 mutex?

2016-06-07 Thread Csaba Raduly via cfe-users
Hi Jeffrey,

On Mon, Jun 6, 2016 at 12:16 PM, Jeffrey Walton via cfe-users
 wrote:
> I'm having trouble determining feature availability at compile time.
> We don't use Autotools and friends; rather, we use the preprocessor.
>
> I've been through the release notes from 2.8 through 3.5 (form: ), and
> I can't find mention of mutex.
>
> I've also been to the latest docs, and I can't find a
> __has_feature(cxx_mutex) or similar
> (http://clang.llvm.org/docs/LanguageExtensions.html).
>
> Finally, I visited http://clang.llvm.org/cxx_status.htmlbut there is
> no topic or item for mutex. There is a statement "Clang 3.3 and later
> implement all of the ISO C++ 2011 standard", so I guess that's the
> version I should use in the absence of better information.

std::mutex is not a feature of the compiler (clang). It is a feature
of the C++ Standard Library (libcxx).

You should look for the  header. If the following compiles,
then mutex should be available:

#include 
std::mutex m;

Csaba
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] binary operator

2016-07-12 Thread Csaba Raduly via cfe-users
Hi Folkert,


On Tue, Jul 12, 2016 at 1:46 PM, folkert via cfe-users wrote:
> Hi,
>
> When iterating through the AST I encounter BinaryOperator-s, part of an
> IfStmt.
> My question now is: how can I find which operator it is? E.g. ==, >=,
> etc.
> I'm using libclang.
>

You can call BinaryOperator::getOpcode, which will return an Opcode,
which is a typedef of the BinaryOperatorKind enum.

Csaba
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] binary operator

2016-07-13 Thread Csaba Raduly via cfe-users
On Wed, Jul 13, 2016 at 9:30 AM, folkert  wrote:
>> > When iterating through the AST I encounter BinaryOperator-s, part of an
>> > IfStmt.
>> > My question now is: how can I find which operator it is? E.g. ==, >=,
>> > etc.
>> > I'm using libclang.
>> >
>>
>> You can call BinaryOperator::getOpcode, which will return an Opcode,
>> which is a typedef of the BinaryOperatorKind enum.
>
> This c++ version, is this from libtooling? Or which library?

The C++ clang library (libclang?)

http://clang.llvm.org/doxygen/classclang_1_1BinaryOperator.html

I thought you had an instance of this class.

Csaba
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] Bug report: Clang 5.0 (SVN r298093) cannot deduct class template arguments of tuple.

2017-03-30 Thread Csaba Raduly via cfe-users
Hi,


Deducing template parameters for constructors is a C++17 feature. You
need to pass the -std=c++1z flag to the compiler.

On Thu, Mar 30, 2017 at 3:48 AM, 312988...@qq.com via cfe-users
 wrote:
> Hi, all,
>
> Below cannot be compiled with clang 5.0 (SVN r298093) on Visual Studio 2017.
>
> #include 
>
> using namespace std;
>
> int main()
> {
> tuple t{ 1, 3.14 };
> }
>
> The error message are as follows:
>
> 1>-- Build started: Project: cpptest, Configuration: Debug x64 --
> 1>main.cpp(19,8): error : no viable constructor or deduction guide for
> deduction of template arguments of 'tuple'
> 1>tuple t{ 1, 3.14 };
> 1>  ^
> 1>C:\Program Files (x86)\Microsoft Visual
> Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\utility(88,8):
> note: candidate function template not viable: requires 0 arguments, but 2
> were provided
> 1>class tuple;
> 1>  ^
> 1>C:\Program Files (x86)\Microsoft Visual
> Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\utility(88,8):
> note: candidate function template not viable: requires 1 argument, but 2
> were provided
> 1>1 error generated.
> 1>Done building project "cpptest.vcxproj" -- FAILED.
> == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==
>
> I have applied for an account for submitting bugs of clang, but no response
> from the administrators. So I have to send mail to this forum.
>
> 
> 312988...@qq.com
>
> ___
> cfe-users mailing list
> cfe-users@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
>



-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] clang-format option to not break lines at operator ->

2017-06-24 Thread Csaba Raduly via cfe-users
Hi Mikhail,

On Thu, Jun 22, 2017 at 11:44 PM, Mikhail Artemyev via cfe-users
 wrote:
> Hi All,
>
> I am currently trying to beatify a reasonably large code base, and I am
> quite surprised about how clang-format breaks long lines where there is a
> '->' operator.
>
> Example:
> % cat test.cpp
> int func() {
>aaa = 
> bb->cc(SomeNamespace::Function(?"":"")).gg();
> }


How would you like the result to look like?

Csaba

-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] Command to check the 'linker' used(by clang++) for executable creation on Mac OS

2018-05-09 Thread Csaba Raduly via cfe-users
Hi Vinay,

On Tue, May 8, 2018 at 2:41 PM, Vinay Kumar via cfe-users
 wrote:
(snip)
> My query is how to confirm(command to check) if my executable is created
> using ld.lld linker or ld.gold/some other linker? What is the default linker
> 'clang++' uses(command to cross-check) on mac os?
>

If you built the executable yourself, the easiest way is to run the
link command again.
(Delete the executable and build it again).
If the tool is not immediately obvious (i.e. it doesn't say "ld" or
"ld.gold" , but "clang++"),
 copy the link step and paste it into the command prompt and add a '-v' option.
This will tell you which sub-programs your compiler is calling.

For example, if your link step is

$ g++ -o store_a_fn.exe store_a_fn.o

run this instead:

$ g++ -v -o store_a_fn.exe store_a_fn.o
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with:
/cygdrive/i/szsz/tmpp/gcc/gcc-6.4.0-5.x86_64/src/gcc-6.4.0/configure
--srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-6.4.0-5.x86_64/src/gcc-6.4.0
--prefix=/usr --exec-prefix=/usr --localstatedir=/var
--sysconfdir=/etc --docdir=/usr/share/doc/gcc
--htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin
--host=x86_64-pc-cygwin --target=x86_64-pc-cygwin
--without-libiconv-prefix --without-libintl-prefix
--libexecdir=/usr/lib --enable-shared --enable-shared-libgcc
--enable-static --enable-version-specific-runtime-libs
--enable-bootstrap --enable-__cxa_atexit --with-dwarf2
--with-tune=generic
--enable-languages=ada,c,c++,fortran,lto,objc,obj-c++
--enable-graphite --enable-threads=posix --enable-libatomic
--enable-libcilkrts --enable-libgomp --enable-libitm
--enable-libquadmath --enable-libquadmath-support --disable-libssp
--enable-libada --disable-symvers --with-gnu-ld --with-gnu-as
--with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix
--without-libintl-prefix --with-system-zlib --enable-linker-build-id
--with-default-libstdcxx-abi=gcc4-compatible
Thread model: posix
gcc version 6.4.0 (GCC)
COMPILER_PATH=/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/:/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/:/usr/lib/gcc/x86_64-pc-cygwin/:/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/:/usr/lib/gcc/x86_64-pc-cygwin/:/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/../../../../x86_64-pc-cygwin/bin/
LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/:/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/../../../../x86_64-pc-cygwin/lib/../lib/:/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/../../../../x86_64-pc-cygwin/lib/:/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'store_a_fn.exe' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-pc-cygwin/6.4.0/collect2.exe -plugin
/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/cyglto_plugin.dll
-plugin-opt=/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/lto-wrapper.exe
-plugin-opt=-fresolution=/tmp/ccWxTpxH.res
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lcygwin
-plugin-opt=-pass-through=-ladvapi32
-plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32
-plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lgcc_s
-plugin-opt=-pass-through=-lgcc --build-id -m i386pep --wrap _Znwm
--wrap _Znam --wrap _ZdlPv --wrap _ZdaPv --wrap _ZnwmRKSt9nothrow_t
--wrap _ZnamRKSt9nothrow_t --wrap _ZdlPvRKSt9nothrow_t --wrap
_ZdaPvRKSt9nothrow_t -Bdynamic --dll-search-prefix=cyg --tsaware -o
store_a_fn.exe /usr/lib/gcc/x86_64-pc-cygwin/6.4.0/../../../../lib/crt0.o
/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/crtbegin.o
-L/usr/lib/gcc/x86_64-pc-cygwin/6.4.0
-L/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/../../../../x86_64-pc-cygwin/lib/../lib
-L/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/../../../../lib -L/lib/../lib
-L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/../../../../x86_64-pc-cygwin/lib
-L/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/../../.. store_a_fn.o -lstdc++
-lgcc_s -lgcc -lcygwin -ladvapi32 -lshell32 -luser32 -lkernel32
-lgcc_s -lgcc 
/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/../../../../lib/default-manifest.o
/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/crtend.o
COLLECT_GCC_OPTIONS='-v' '-o' 'store_a_fn.exe' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'



Csaba
-- 
You can get very substantial performance improvements by not doing the
right thing.
   - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformat way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] [cfe-dev] Warnings for implicit constructors and wrong usage of auto

2018-05-16 Thread Csaba Raduly via cfe-users
On 5/16/18, Andrea Arteaga via cfe-users  wrote:
> Thanks for your reply, John.
>
> I fully understand your points, I actually had the same concern that a
> reference-to-rvalue warning would be issued for perfectly reasonable and
> intended code.

For example,

vector ints{1,2,3,4,5};
auto i = ints.front();

Also, one may want to take a copy, e.g. for modifying it:

vector strings{"foo", "bar"};
auto foo = strings.front();
foo.append{"tball"};

Csaba
-- 
You can get very substantial performance improvements by not doing the
right thing.
   - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformat way
to get the wrong information: this is what you want. - Scott Meyers
(C++TDaWYK)
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] help with linux setup and clang-6

2018-09-01 Thread Csaba Raduly via cfe-users
Hi Milan,

On Sat, Sep 1, 2018 at 1:11 AM, Milan Andric via cfe-users wrote:
(snip)
>
> Test program:
>
> ```test.cpp
> #include 
> int main()
> {
> std::optional o1;
> }
> ```
>
> Error I am having below. I tried with a few different flags but always with
> the same failure.
>
> ```
> $ clang++-6.0 -std=c++17 -o test.o test.cpp
> test.cpp:1:10: fatal error: 'optional' file not found
> #include 
>  ^~
> 1 error generated.
> ```
>
> Clang version and linkage info.
>
> ```
> $ clang++-6.0 --version
> clang version 6.0.1-svn334776-1~exp1~20180826122732.96 (branches/release_60)
> Target: x86_64-pc-linux-gnu
> Thread model: posix
> InstalledDir: /usr/bin
>

In order to use std::optional, you need a Standard C++ Library that
supports C++17. For clang, this is libc++, which is usually packaged
separately.

If clang can't find libc++, it will search for and use GCC's Standard
C++ Library (libstdc++). If you run clang++ with the -v switch, you
can see what it found.

In short, without libc++, clang falls back to GCC's libstdc++. This
means that in order to be able to use C++17 *library* features (like
std::optional), you need a libstdc++ which implements these features.
Bionic Beaver (18.04) includes GCC 7.3, whose libstdc++ implements
std::optional. This is why your test succeeds on 18.04

Csaba
-- 
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformat way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] Linking error and memory bloating for .so file creation

2019-03-12 Thread Csaba Raduly via cfe-users
Hi Ankush,
On Mon, Mar 11, 2019 at 8:23 PM Ankush Sharma wrote:
> During the linking stage for an “.so” file creation, an error message is 
> being flagged by clang.
>
> ld: error: dummy.so: write: Function not implemented

What was the command line that was used to invoke the linker?
What filesystem are you using?

Csaba
-- 
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformat way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)
___
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


[cfe-users] Implicit or explicit public inheritance in the AST

2020-06-08 Thread Csaba Raduly via cfe-users
Hi all,

If I run `clang++ -std=c++17 -Xclang -ast-dump` on the following code:

struct B {};

struct D1 : B {};

struct D2 : public B {};

the output is

|-CXXRecordDecl 0x8000bdd48  col:8 referenced struct B
definition
| |-DefinitionData pass_in_registers empty aggregate standard_layout
trivially_copyable pod trivial literal has_constexpr_non_copy_move_ctor
can_const_default_init
| | |-DefaultConstructor exists trivial constexpr needs_implicit
defaulted_is_constexpr
| | |-CopyConstructor simple trivial has_const_param needs_implicit
implicit_has_const_param
| | |-MoveConstructor exists simple trivial needs_implicit
| | |-CopyAssignment trivial has_const_param needs_implicit
implicit_has_const_param
| | |-MoveAssignment exists simple trivial needs_implicit
| | `-Destructor simple irrelevant trivial needs_implicit
| `-CXXRecordDecl 0x8000bde58  col:8 implicit struct B
|-CXXRecordDecl 0x8000bdef8  col:8 struct D1 definition
| |-DefinitionData pass_in_registers empty aggregate standard_layout
trivially_copyable trivial literal has_constexpr_non_copy_move_ctor
can_const_default_init
| | |-DefaultConstructor exists trivial constexpr needs_implicit
defaulted_is_constexpr
| | |-CopyConstructor simple trivial has_const_param needs_implicit
implicit_has_const_param
| | |-MoveConstructor exists simple trivial needs_implicit
| | |-CopyAssignment trivial has_const_param needs_implicit
implicit_has_const_param
| | |-MoveAssignment exists simple trivial needs_implicit
| | `-Destructor simple irrelevant trivial needs_implicit
| |-public 'B'
| `-CXXRecordDecl 0x80015c878  col:8 implicit struct D1
`-CXXRecordDecl 0x80015c918  col:8 struct D2 definition
  |-DefinitionData pass_in_registers empty aggregate standard_layout
trivially_copyable trivial literal has_constexpr_non_copy_move_ctor
can_const_default_init
  | |-DefaultConstructor exists trivial constexpr needs_implicit
defaulted_is_constexpr
  | |-CopyConstructor simple trivial has_const_param needs_implicit
implicit_has_const_param
  | |-MoveConstructor exists simple trivial needs_implicit
  | |-CopyAssignment trivial has_const_param needs_implicit
implicit_has_const_param
  | |-MoveAssignment exists simple trivial needs_implicit
  | `-Destructor simple irrelevant trivial needs_implicit
  |-public 'B'
  `-CXXRecordDecl 0x80015ca68  col:8 implicit struct D2
I can see no difference between the CXXRecordDecl for D1 and D2. Is there a
way to tell, when visiting the AST, whether the inheritance of the derived
class was specified implicitly or explicitly? (Hopefully yes, just not
visible in the output of ast-dump).


Csaba
Sent from my 12-core Windows machine, using Gmail.
-- 
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformant
way
to get the wrong information: this is what you want. - Scott Meyers
(C++TDaWYK)
___
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] Building with Clang (on Windows) - but for Linux

2020-08-25 Thread Csaba Raduly via cfe-users
Hi John,

On Tue, 25 Aug 2020 at 17:47, John Emmas via cfe-users
 wrote:
>
> Sorry about the confusing subject line!!  I use Visual Studio 2019 on
> Windows 10 and I've just installed something called WSL (Windows
> Subsystem for Linux) which allows it to build apps for Linux.  A big
> part of this involves installing a Linux distro and I've chosen Debian
> (mostly it just installs basic utilities and a bash shell).
>
> Part of the process involved me issuing this bash command:-
>
>  sudo apt-get install openssh-server g++ gdb gdbserver
>
> After which, I could then build g++ Linux apps - even though I'm running
> everything in Windows.  I then did this:-
>
>  sudo apt-get install clang
>
> So I can now build with clang, as well as g++ - but what about
> debugging?  Should I have also installed a clang debugger?  And if so,
> what would be the apt-get command for that?  Thanks,

You can debug programs created by clang with gdb (which you already installed).

Clang has its own debugger (called lldb). It's packaged separately and
you can install it with

  sudo apt-get install lldb

(You can also debug programs created with g++ with lldb. Such is the
power of open standards)

However, I would recommend checking out Visual Studio Code, which can
do remote development (including debugging) on WSL (vscode runs on
Windows, compilers and debuggers run on WSL).

Csaba
-- 
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformant way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)
___
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] Building with Clang (on Windows) - but for Linux

2020-08-26 Thread Csaba Raduly via cfe-users
Hi John,

On Wed, 26 Aug 2020 at 10:33, John Emmas via cfe-users
 wrote:
>
> BTW - I often see Clang described as "llvm" or "cfe" and I've often
> wondered what they stand for ??

Folr LLVM : https://lmgtfy.com/?q=LLVM&pp=1

CFE stands for "C Front-End", a C family (C, C++, Objective C/C++,
etc.) language front-end (https://clang.llvm.org/). It's part of the
LLVM project.


Chris Lattner's first email on cfe-dev
(https://lists.llvm.org/pipermail/cfe-dev/2007-July/00.html)
already calls it "clang", but "cfe" was the component name in
Bugzilla, the mailing list name, and the directory in Subversion (
http://llvm.org/svn/llvm-project/cfe/trunk/ ).


Csaba
-- 
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformant way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)
___
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] Issue with clang-13

2021-12-24 Thread Csaba Raduly via cfe-users
Hi Sunil,

On Fri, 24 Dec 2021 at 14:51, Sunil Kumar via cfe-users
 wrote:
>
> Hi,
> I tried many times to install clang-13 in ubuntu-16.04. I followed the steps 
> mentioned below.
>
> git clone https://github.com/llvm/llvm-project.git
> git checkout llvmorg-13.0.0
> cd llvm-project
> mkdir build
> cd build
> cmake -DLLVM_ENABLE_PROJECTS=clang -G "Unix Makefiles" ../llvm
> make
>
> After running make command, it failed to install clang eventually and showed 
> some error mentioned below
> 
> make:342: recipe for target 'bin/clang-13' failed
> make[2]: *** [bin/clang-13] Error 1
> make[2]: *** Deleting file 'bin/clang-13' CMakeFiles/Makefile2:38992: recipe 
> for target 'tools/clang/tools/driver/CMakeFiles/clang.dir/all' failed
> make[1]: *** [tools/clang/tools/driver/CMakeFiles/clang.dir/all] Error 2
> collect2: fatal error: ld terminated with signal 9 [Killed] compilation 
> terminated.
> -
> Please help to resolve this bug.

It's not a bug in clang if you kill the linker program.

If it wasn't you who killed the linker program, perhaps it was the
out-of-memory killer. You can try to solve the out-of-memory issue:

1. Buy more memory for your computer, or
2. Delete the build directory, create it again, then add
-DCMAKE_BUILD_TYPE=Release to the cmake command line, and build again.
Debug builds require more memory, because of the large amount of debug
info. Hopefully the release build will not run into out-of-memory.

Are you using a 32-bit system by any chance?

Csaba
-- 
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformant way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)
___
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users