<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hmmm, unfortunately I don't use libc++.<br>
</p>
<div class="moz-cite-prefix">On 12/15/19 2:31 AM, Arthur O'Dwyer
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CADvuK0K6YSkr9tBuoV9rBrpsP=rwCuhnBKgpTGtFyiA1tQMKAg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">On Tue, Dec 10, 2019 at 10:09 PM Jens
Jorgensen via cfe-dev <<a
href="mailto:cfe-dev@lists.llvm.org"
moz-do-not-send="true">cfe-dev@lists.llvm.org</a>>
wrote:<br>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px
0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Apply
my patch and build like :<br>
<br>
cmake -DLLVM_ENABLE_PROJECTS=clang -G "Unix
Makefiles"<br>
-DCMAKE_BUILD_TYPE=Release<br>
-DCLANG_XCODE_TOOLCHAIN_ROOT=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain<br>
../llvm-project/llvm<br>
</blockquote>
<div><br>
</div>
<div>Using Jens' patch (attached), I managed to get
`make clang` to build. However, I still can't get
`make cxx` to build.</div>
<div><br>
</div>
<div>
<div>cmake -G "Ninja"
-DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi"
-DCMAKE_BUILD_TYPE=RelWithDebInfo \</div>
<div>
-DCLANG_XCODE_TOOLCHAIN_ROOT=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
\</div>
<div> ../llvm</div>
<div>ninja cxx</div>
</div>
<div><br>
</div>
<div>
<div>[223/272] Linking CXX shared library
lib/libc++abi.1.0.dylib</div>
<div>FAILED: lib/libc++abi.1.0.dylib</div>
<div>[...snip...]</div>
<div>Undefined symbols for architecture x86_64:</div>
<div> "__ZTIDu", referenced from:</div>
<div> -exported_symbol[s_list] command line
option</div>
<div> "__ZTIPDu", referenced from:</div>
<div> -exported_symbol[s_list] command line
option</div>
<div> "__ZTIPKDu", referenced from:</div>
<div> -exported_symbol[s_list] command line
option</div>
<div> "typeinfo for __float128 const*", referenced
from:</div>
<div> -exported_symbol[s_list] command line
option</div>
<div> "typeinfo for __int128 const*", referenced
from:</div>
<div> -exported_symbol[s_list] command line
option</div>
<div> "typeinfo for unsigned __int128 const*",
referenced from:</div>
<div> -exported_symbol[s_list] command line
option</div>
<div>[...snip...]</div>
</div>
<div><br>
</div>
<div>Then I tried adding `compiler-rt` to
LLVM_ENABLE_PROJECTS and building `ninja
compiler-rt`, but it also errors:</div>
<div><br>
</div>
<div>
<div>cmake -G "Ninja"
-DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi;compiler-rt"
-DCMAKE_BUILD_TYPE=RelWithDebInfo \</div>
<div>
-DCLANG_XCODE_TOOLCHAIN_ROOT=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
\</div>
<div>
-DCOMPILER_RT_HAS_WNON_VIRTUAL_DTOR_FLAG=yes \</div>
<div> ../llvm</div>
<div>ninja compiler-rt</div>
</div>
<div><br>
</div>
<div>
<div>[533/839] Building CXX object
projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_osx_dynamic.dir/rtl/tsan_interceptors_mac.cpp.o</div>
<div>[...]/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cpp:26:10:
fatal error: 'os/lock.h' file not found</div>
<div>#include <os/lock.h></div>
<div> ^</div>
<div>1 error generated.</div>
</div>
<div><br>
</div>
<div>Anyone got any tips for building libc++ on Mac
OSX?</div>
<div><br>
</div>
<div>–Arthur</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
Jens B. Jorgensen
<a class="moz-txt-link-abbreviated" href="mailto:jbj1@ultraemail.net">jbj1@ultraemail.net</a>
</pre>
</body>
</html>