libc++

What does Clang's 'type_visibility' attribute do, and when should one use it?

我的梦境 提交于 2019-12-04 22:50:19
It is used in libc++ on many template types such as tuple_element , tuple , etc. As far as I can tell there is no public documentation of what it does other than the commit message introducing it and this unit test in the clang project. This attribute allows the ELF visibility of a type and (presumably) its vague linkage objects (vtable, typeinfos) to be controlled separately from the visibility of functions and data members of the type. This allows typeinfos and the vtable for, say, explicit instantiations of a templated polymorphic type to be located centrally without forcing default

Possible to enable libc++ debug checks?

十年热恋 提交于 2019-12-04 20:15:12
I've been wondering if it is possible to enable any debug checks for libc++. One of my favorite things about MSVC's STL is that it catches some otherwise hard to find bugs right from the get go (though I wish it were easier to disable for speed). After peeking in the headers I tried: #define _LIBCPP_DEBUG_LEVEL 2 However, this leads to build errors ('__get_db undeclared'). Any insights on whether this is a work in progress, or if there is a different expected way to enable these checks? This is definitely a work in progress. There's a (very old) status page here that I need to update. The idea

xlocale broken on OS X?

守給你的承諾、 提交于 2019-12-04 08:47:45
I have a simple program that tests converting between wchar_t and char using a series of locales passed to it on the command line. It outputs a list of the conversions that fail by printing out the locale name and the string that failed to convert. I'm building it using clang and libc++. My understanding is that libc++'s named locale support is provided by the xlocale library on OS X. I'm seeing some unexpected failures, as well as some instances where conversion should fail, but doesn't. Here's the program. #warning call this program like: "locale -a | ./a.out" or pass \ locale names valid

Undefined reference to `__cxa_thread_atexit@@CXXABI` when compiling with `libc++` on linux

此生再无相见时 提交于 2019-12-04 07:50:58
I'm trying to compile my projects on Arch Linux x64 using libc++ , libc++abi and clang++ 3.6.0 . The projects compile properly, but fail to link with the following error: error: CMakeFiles/main.cpp.o: undefined reference to symbol '__cxa_thread_atexit@@CXXABI_1.3.7' /usr/lib/libstdc++.so.6:-1: error: error adding symbols: DSO missing from command line I'm compiling and linking using the -stdlib=libc++ -lc++abi flags. Is there any additional library I should link? Am I missing a flag? Either link with -lsupc++ or provide a small wrapper function (probably the better way for libc++ ) for the

Does the standard mandate enable_shared_from_this is to be inherited publicly? Why?

百般思念 提交于 2019-12-04 03:11:22
问题 It's common to inherit from enable_shared_from_this just to be able to return shared_ptr 's from member functions as the primary intention, with no intention of exposing enable_shared_from_this API in the derived class. Since to make use of enable_shared_from_this one must do so through public inheritance (does the standard mandates this? what's the rationale?), this can't be achieved and enable_shared_from_this API is forced into derived class public API. Inherenting enable_shared_from_this

zipalign: error while loading shared libraries: libc++.so: cannot open shared object file: No such file or directory

雨燕双飞 提交于 2019-12-03 21:49:33
I am trying to build android app. When I run the zip align tool to optimize the APK, I get this error message: zipalign: error while loading shared libraries: libc++.so: cannot open shared object file: No such file or directory I tried to install libc++ sudo aptitude install libc++ it says: Couldn't find package "libc+". Snapshot of my terminal If your system is 64-bits, there should be a folder lib64 on the path of [android-path]/build-tools/[version]/ The files in lib64 are [ec2-user 25.0.2]$ ll lib64/ total 51628 -rwxrwxrwx 1 ec2-user ec2-user 30712616 Dec 23 07:22 libLLVM.so -rwxrwxrwx 1

What is the sanctioned way to build libc++ for clang on Linux?

假如想象 提交于 2019-12-03 12:36:27
Edit/Update/Note: Just let clang use libstdc++. Has been working really well for me so far. =============================== In the past I have been able to succeed by doing something with cmake , but just now I discovered a buildit script inside the lib directory of the http://llvm.org/svn/llvm-project/libcxx/trunk project tree. This buildit script appears to not make use of libsupc++ which is what the cmake approach that I took earlier used. For instance, this guide shows one cmake incantation to produce a makefile for libc++ , which will be able to take care of compiling and installation. My

Tesseract-OCR 3.02 with libc++

∥☆過路亽.° 提交于 2019-12-03 10:17:30
问题 Xcode 4.6, iOS SDK 6.1, tesseract-ocr 3.02 Since the last OpenCV versions are built using libc++ , and tesseract-ocr is built using libstdc++ , they can't be used together in one xcode project. So, I'm trying to build tesseract using libc++. Using the script here (updating the base sdk and deploy target to 6.1), tesseract is being built just fine, and works in my xcode project once the C++ standard library is set to the compiler default. Than, I tried altering the script to build it with libc

What is the difference between libc++ and libc++abi library in LLVM?

六月ゝ 毕业季﹏ 提交于 2019-12-03 05:41:37
I saw the two projects are quite related, but what are the differences between them? The official webpage doesn't tell much about it. I know that ABI (Application Binary Interface) is used to provide low-level binary interface among different platforms. So is libc++abi used to provide different implementations for different platforms, and general interface for libc++? Would be better go give some specific example, e.g. what are included in libc++abi and what in libc++. Thanks. The Application Binary Interface , or ABI for short, is intended to provide certain low level functions from which to

Install libc++ on ubuntu

别等时光非礼了梦想. 提交于 2019-12-03 05:04:19
问题 I am wondering what is the right/easy way to install a binary libc++ on Ubuntu, in my case Trusty aka 14.04? On the LLVM web site there are apt packages http://apt.llvm.org/ and I have used these to install 3.9. However these packages don't seem to include libc++. I install the libc++-dev package but that seems to be a really old version. There are also binaries that can be downloaded http://llvm.org/releases/download.html#3.9.0. These do seem to contain libc++ but I'm not sure if I can just