Skip to content

Commit 241a7ff

Browse files
get libc++ building thanks to @compnerd
1 parent 6a08c94 commit 241a7ff

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

bootstrap.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,19 @@ function build_libcxx () {
168168
-D LIBCXX_SYSROOT=$SYSROOT/usr/local \
169169
-D LIBCXX_HAS_MUSL_LIBC=YES \
170170
-D LIBCXX_USE_COMPILER_RT=YES \
171-
--debug-trycompile \
171+
-D LIBCXX_INCLUDE_BENCHMARKS=NO \
172172
-D CMAKE_EXE_LINKER_FLAGS="-rtlib=compiler-rt -resource-dir=$RESOURCE --sysroot=$RESOURCE" \
173+
-D LIBCXX_SUPPORTS_NOSTDLIBXX_FLAG=NO \
173174
-G Ninja \
174175
-S ..
176+
# TODO: should we add LIBCXX_BUILTINS_LIBRARY="${SYSROOT}/usr/local/lib/linux/libclang_rt.builtins-x86_64.a"
177+
# as per @compnerd?
178+
#--debug-trycompile \
175179
#-D CMAKE_C_COMPILER_WORKS=YES \
176180
#-D LIBCXX_LINK_FLAGS="-stdlib=libc++" \
177181
#-D LIBCXX_LINK_FLAGS="-nodefaultlibs -lc -rtlib=compiler-rt" \
178182
ninja libc++.so
179-
183+
DESTDIR=$SYSROOT ninja install-cxx install-cxx-headers
180184

181185
popd
182186
}
@@ -187,8 +191,7 @@ bootstrap_compiler_rt
187191
./musl.sh
188192
build_libunwind
189193
build_libcxxabi
190-
#TODO: this doesn't work yet
191-
#build_libcxx
194+
build_libcxx
192195

193196
# Fangrui says try:
194197
# -DLLVM_HOST_TRIPLE=

0 commit comments

Comments
 (0)