且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是否有可能建立与铛和gcc支持提升?

更新时间:2023-11-10 15:07:28

这是可能的,但它是有问题的,如果你真的应该这样做。

It is possible, but it's questionable if you really should do that.

您将不得不选择要么使用的libc ++ 的libstdc ++ 有两种编译器。

You would have to choose either to use libc++ or libstdc++ with both compilers.

的libstdc ++ 绝对是铛以来***的一个可以处理它完美,
GCC有几个解析的libc ++ 头的问题。

libstdc++ is definitely the better one since clang can deal with it flawlessly, gcc has problems parsing several libc++ headers.

这样的事情应该让铛使用gcc的的libstdc ++ Mac OS X上。

Something like this should make clang use gcc's libstdc++ on Mac OS X.

clang++ \
  -stdlib=libstdc++ \
  -nostdinc++ \
  -Qunused-arguments \
  -nodefaultlibs \
  <path to>x86_64-apple-darwin14/lib/libstdc++.a \
  <path to>x86_64-apple-darwin14/lib/libsupc++.a \
  <path to>lib/gcc/x86_64-apple-darwin14/5.2.0/libgcc.a \
  <path to>lib/gcc/x86_64-apple-darwin14/5.2.0/libgcc_eh.a \
  -lc \
  -Wl,-no_compact_unwind \
  -cxx-isystem <path to>x86_64-apple-darwin14/include/c++/5.2.0 \
  -cxx-isystem <path to>x86_64-apple-darwin14/include/c++/5.2.0/x86_64-apple-darwin14 \
  -mmacosx-version-min=10.7.0

我建议把这个包装脚本,然后通过 CXX =铛++ - ++的libstdc
升压构建脚本。

I recommend to put this in a wrapper script, then pass CXX=clang++-libstdc++ to the boost build script.

例如包装脚本:

#!/bin/sh

ls -l "$@"

裹LS。