Skip to content

Commit d3d3fc6

Browse files
committed
Skip expensive testing under ASan and add TODO based on review.
1 parent 65d72b2 commit d3d3fc6

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

toolchain/driver/clang_runtimes_test.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,17 @@ TEST_F(ClangRuntimesTest, Libunwind) {
199199
}
200200

201201
TEST_F(ClangRuntimesTest, Libcxx) {
202+
#if __has_feature(address_sanitizer)
203+
// ASan causes Clang and LLVM to be _egregiously_ inefficient at compiling
204+
// libc++, taking 5x - 10x longer than without ASan. Rough estimate is that it
205+
// would take 5-10 minutes on GitHub's Linux runner. Given the limited utility
206+
// of this test coverage, skip it in that configuration. This also misses
207+
// assert-coverage for building libc++, but we don't really expect issues
208+
// there. Misconfiguration and other common issues should still be covered in
209+
// fully optimized builds at much lower cost.
210+
GTEST_SKIP() << "Skipping build of libc++ with an ASan-itized Clang";
211+
#endif
212+
202213
LibcxxBuilder libcxx_builder(&runner_, &threads_, target_triple_, &runtimes_);
203214
auto build_result = std::move(libcxx_builder).Wait();
204215
ASSERT_TRUE(build_result.ok()) << build_result.error();

toolchain/install/BUILD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ configure_cmake_file(
178178
# configuration defines. Note that while this is sorted here in the
179179
# BUILD file, it is expanded at the _end_ of the configuration header
180180
# and so overrides the other configuration settings.
181+
#
182+
# TODO: This is a lot of C++ code to embed into a BUILD file. Even
183+
# though it moves it farther from the interacting CMake defines, we
184+
# should look at factoring this into a header that is included.
181185
"_LIBCPP_ABI_DEFINES": "\n".join([
182186
# We want to install a single header that works in all build modes,
183187
# so we define the ABI namespace based on how the header is used

0 commit comments

Comments
 (0)