When are libC ++ sources needed when creating Clang from sources?

I have built Clang on Linux and OS X for many years. From the LLVM download page , I have always used the following sources

  • LLVM (LLVM source)
  • Front End Compiler (Clang Source)
  • RT compiler (runtime source)
  • Compiler Tools (Tools Additional Resources)

The recipe that I use to download, build and install Clang 3.5 can be found in Clang 3.5 to download, install and install the script .

His work works fine on OS X 10.7 and 10.8, and I never need to transfer libC ++ to OS X 10.7.x or 10.8.x (around 2010 or through the current one).

Question : when do you need lib ++ and lib ++ ABI sources?


I am trying to help eliminate the inability to compile a simple C ++ Hello World program on OS X 10.9. Clang 3.5 is installed in /usr/local (like others), but it cannot find headers (for example, <iostream> ), and it encounters undefined characters during the link (for example, "std::ostream::operator<<(std::ostream& (*)(std::ostream&))" ).

I am wondering if the headers and libraries 10.7 and 10.8 had, where previous versions of Clang were expected, but 10.9 needs to be built and installed.

Question : is this a symptom of missing libC ++ and libC ++ ABI?

+2
source share
1 answer

You must have libC ++ sources extracted when creating / installing clang, so that you also install STL C ++.

If your system does not have the libC ++ executable, you should check and install libC ++ abi and libC ++, which can be made standalone and regardless of whether they are checked in your llvm / clang installation.

As a reference, I suggest you take a look at the ports libcxxabi, libcxx, libunwind, and llvm-XY in MacPorts, which show how I configured these projects on Leopard through Yosemite.

+2
source

Source: https://habr.com/ru/post/984564/


All Articles