annotate libcxxabi/www/index.html @ 164:fdfabb438fbf

...
author anatofuz
date Thu, 19 Mar 2020 17:02:53 +0900
parents 1d019706d866
children 2e18cbf3894f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
anatofuz
parents:
diff changeset
2 "http://www.w3.org/TR/html4/strict.dtd">
anatofuz
parents:
diff changeset
3 <!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
anatofuz
parents:
diff changeset
4 <html>
anatofuz
parents:
diff changeset
5 <head>
anatofuz
parents:
diff changeset
6 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
anatofuz
parents:
diff changeset
7 <title>"libc++abi" C++ Standard Library Support</title>
anatofuz
parents:
diff changeset
8 <link type="text/css" rel="stylesheet" href="menu.css">
anatofuz
parents:
diff changeset
9 <link type="text/css" rel="stylesheet" href="content.css">
anatofuz
parents:
diff changeset
10 </head>
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 <body>
anatofuz
parents:
diff changeset
13 <div id="menu">
anatofuz
parents:
diff changeset
14 <div>
anatofuz
parents:
diff changeset
15 <a href="https://llvm.org/">LLVM Home</a>
anatofuz
parents:
diff changeset
16 </div>
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 <div class="submenu">
anatofuz
parents:
diff changeset
19 <label>libc++abi Info</label>
anatofuz
parents:
diff changeset
20 <a href="/index.html">About</a>
anatofuz
parents:
diff changeset
21 </div>
anatofuz
parents:
diff changeset
22
anatofuz
parents:
diff changeset
23 <div class="submenu">
anatofuz
parents:
diff changeset
24 <label>Quick Links</label>
anatofuz
parents:
diff changeset
25 <a href="https://libcxx.llvm.org/">libc++</a>
anatofuz
parents:
diff changeset
26 <a href="https://lists.llvm.org/mailman/listinfo/libcxx-dev">libcxx-dev</a>
anatofuz
parents:
diff changeset
27 <a href="https://lists.llvm.org/mailman/listinfo/libcxx-commits">libcxx-commits</a>
anatofuz
parents:
diff changeset
28 <a href="https://bugs.llvm.org/">Bug Reports</a>
anatofuz
parents:
diff changeset
29 <a href="https://github.com/llvm/llvm-project/tree/master/libcxxabi/">Browse Sources</a>
anatofuz
parents:
diff changeset
30 </div>
anatofuz
parents:
diff changeset
31 </div>
anatofuz
parents:
diff changeset
32
anatofuz
parents:
diff changeset
33 <div id="content">
anatofuz
parents:
diff changeset
34 <!--*********************************************************************-->
anatofuz
parents:
diff changeset
35 <h1>"libc++abi" C++ Standard Library Support</h1>
anatofuz
parents:
diff changeset
36 <!--*********************************************************************-->
anatofuz
parents:
diff changeset
37
anatofuz
parents:
diff changeset
38 <p>libc++abi is a new implementation of low level support for a standard
anatofuz
parents:
diff changeset
39 C++ library.</p>
anatofuz
parents:
diff changeset
40
anatofuz
parents:
diff changeset
41 <p>All of the code in libc++abi is <a
anatofuz
parents:
diff changeset
42 href="https://llvm.org/docs/DeveloperPolicy.html#copyright-license-and-patents">dual licensed</a>
anatofuz
parents:
diff changeset
43 under the MIT license and the UIUC License (a BSD-like license).</p>
anatofuz
parents:
diff changeset
44
anatofuz
parents:
diff changeset
45 <!--=====================================================================-->
anatofuz
parents:
diff changeset
46 <h2 id="goals">Features and Goals</h2>
anatofuz
parents:
diff changeset
47 <!--=====================================================================-->
anatofuz
parents:
diff changeset
48
anatofuz
parents:
diff changeset
49 <ul>
anatofuz
parents:
diff changeset
50 <li>Correctness as defined by the C++11 standard.</li>
anatofuz
parents:
diff changeset
51 <li>Provide a portable sublayer to ease the porting of <a href="https://libcxx.llvm.org/">libc++</a></li>
anatofuz
parents:
diff changeset
52 <li>On Mac OS X, be ABI compatible with the existing low-level support.</li>
anatofuz
parents:
diff changeset
53 </ul>
anatofuz
parents:
diff changeset
54
anatofuz
parents:
diff changeset
55 <!--=====================================================================-->
anatofuz
parents:
diff changeset
56 <h2 id="requirements">Platform Support</h2>
anatofuz
parents:
diff changeset
57 <!--=====================================================================-->
anatofuz
parents:
diff changeset
58
anatofuz
parents:
diff changeset
59 <p>libc++abi is known to work on the following platforms, using clang.</p>
anatofuz
parents:
diff changeset
60
anatofuz
parents:
diff changeset
61 <ul>
anatofuz
parents:
diff changeset
62 <li>Darwin</li>
anatofuz
parents:
diff changeset
63 </ul>
anatofuz
parents:
diff changeset
64
anatofuz
parents:
diff changeset
65 <!--=====================================================================-->
anatofuz
parents:
diff changeset
66 <h2 id="dir-structure">Current Status</h2>
anatofuz
parents:
diff changeset
67 <!--=====================================================================-->
anatofuz
parents:
diff changeset
68
anatofuz
parents:
diff changeset
69 <p>libc++abi is complete. <a href="spec.html">Here</a> is a
anatofuz
parents:
diff changeset
70 list of functionality.</p>
anatofuz
parents:
diff changeset
71
anatofuz
parents:
diff changeset
72 <!--=====================================================================-->
anatofuz
parents:
diff changeset
73 <h2>Get it and get involved!</h2>
anatofuz
parents:
diff changeset
74 <!--=====================================================================-->
anatofuz
parents:
diff changeset
75
anatofuz
parents:
diff changeset
76 <p>To check out the code (including llvm and others), use:</p>
anatofuz
parents:
diff changeset
77
anatofuz
parents:
diff changeset
78 <ul>
anatofuz
parents:
diff changeset
79 <li><code>git clone https://github.com/llvm/llvm-project.git</code></li>
anatofuz
parents:
diff changeset
80 </ul>
anatofuz
parents:
diff changeset
81
anatofuz
parents:
diff changeset
82 <p>To build:</p>
anatofuz
parents:
diff changeset
83 <ul>
anatofuz
parents:
diff changeset
84 <li><code>cd llvm-project</code></li>
anatofuz
parents:
diff changeset
85 <li><code>mkdir build &amp;&amp; cd build</code></li>
anatofuz
parents:
diff changeset
86 <li><code>cmake -DLLVM_ENABLE_PROJECTS=libcxxabi ../llvm # on linux you may need to specify -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++</code></li>
anatofuz
parents:
diff changeset
87 <li><code>make</code></li>
anatofuz
parents:
diff changeset
88 </ul>
anatofuz
parents:
diff changeset
89
anatofuz
parents:
diff changeset
90 <p>To do a standalone build:</p>
anatofuz
parents:
diff changeset
91 <ul>
anatofuz
parents:
diff changeset
92 <li>
anatofuz
parents:
diff changeset
93 Check out the source tree. This includes the other subprojects, but you'll only use the libcxxabi part.
anatofuz
parents:
diff changeset
94 </li>
anatofuz
parents:
diff changeset
95 <li><code>cd llvm-project</code></li>
anatofuz
parents:
diff changeset
96 <li><code>mkdir build-libcxxabi &amp;&amp; cd build-libcxxabi</code></li>
anatofuz
parents:
diff changeset
97 <li><code>cmake -DLIBCXXABI_LIBCXX_PATH=path/to/libcxx ../libcxxabi # on
anatofuz
parents:
diff changeset
98 linux you may need -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++</code></li>
anatofuz
parents:
diff changeset
99 <li><code>make</code></li>
anatofuz
parents:
diff changeset
100 </ul>
anatofuz
parents:
diff changeset
101 <p> By default CMake uses <code>llvm-config</code> to locate the required
anatofuz
parents:
diff changeset
102 LLVM sources. If CMake cannot find <code>llvm-config</code> then you must
anatofuz
parents:
diff changeset
103 configure CMake using either of the following options.
anatofuz
parents:
diff changeset
104 </p>
anatofuz
parents:
diff changeset
105 <ul>
anatofuz
parents:
diff changeset
106 <li><code>-DLLVM_CONFIG_PATH=path/to/llvm-config</code></li>
anatofuz
parents:
diff changeset
107 <li><code>-DLLVM_PATH=path/to/llvm-source-root</code></li>
anatofuz
parents:
diff changeset
108 </ul>
anatofuz
parents:
diff changeset
109
anatofuz
parents:
diff changeset
110 </p>
anatofuz
parents:
diff changeset
111
anatofuz
parents:
diff changeset
112 <p>To run the tests:</p>
anatofuz
parents:
diff changeset
113 <ul>
anatofuz
parents:
diff changeset
114 <li><code>make check-cxxabi</code></li>
anatofuz
parents:
diff changeset
115 </ul>
anatofuz
parents:
diff changeset
116 <p>Note: in a standalone build, the system's libc++ will be used for tests. If
anatofuz
parents:
diff changeset
117 the system's libc++ was statically linked against libc++abi (or linked against
anatofuz
parents:
diff changeset
118 a different ABI library), this may interfere with test results.</p>
anatofuz
parents:
diff changeset
119
anatofuz
parents:
diff changeset
120 <p>Send discussions to the
anatofuz
parents:
diff changeset
121 (<a href="https://lists.llvm.org/mailman/listinfo/libcxx-dev">libcxx-dev mailing list</a>).</p>
anatofuz
parents:
diff changeset
122
anatofuz
parents:
diff changeset
123 <!--=====================================================================-->
anatofuz
parents:
diff changeset
124 <h2>Frequently asked questions</h2>
anatofuz
parents:
diff changeset
125 <!--=====================================================================-->
anatofuz
parents:
diff changeset
126
anatofuz
parents:
diff changeset
127 <p>Q: Why are the destructors for the standard exception classes defined in libc++abi?
anatofuz
parents:
diff changeset
128 They're just empty, can't they be defined inline?</p>
anatofuz
parents:
diff changeset
129 <p>A: The destructors for them live in libc++abi because they are "key" functions.
anatofuz
parents:
diff changeset
130 The Itanium ABI describes a "key" function as the first virtual declared.
anatofuz
parents:
diff changeset
131 And wherever the key function is defined, that is where the <code>type_info</code> gets defined.
anatofuz
parents:
diff changeset
132 And in libc++ types are the same type if and only if they have the same <code>type_info</code>
anatofuz
parents:
diff changeset
133 (as in there must be only one type info per type in the entire application).
anatofuz
parents:
diff changeset
134 And on OS X, libstdc++ and libc++ share these exception types.
anatofuz
parents:
diff changeset
135 So to be able to throw in one dylib and catch in another (a <code>std::exception</code> for example),
anatofuz
parents:
diff changeset
136 there must be only one <code>std::exception type_info</code> in the entire app.
anatofuz
parents:
diff changeset
137 That typeinfo gets laid down beside <code>~exception()</code> in libc++abi (for both libstdc++ and libc++).</p>
anatofuz
parents:
diff changeset
138 <p>--Howard Hinnant</p>
anatofuz
parents:
diff changeset
139
anatofuz
parents:
diff changeset
140 </div>
anatofuz
parents:
diff changeset
141 </body>
anatofuz
parents:
diff changeset
142 </html>