Skip to content

Commit 506cf6d

Browse files
committed
[libc++] Fix modules and benchmarks CI builds when incomplete features are disabled
Differential Revision: https://reviews.llvm.org/D119036
1 parent 0748639 commit 506cf6d

File tree

20 files changed

+42
-38
lines changed

20 files changed

+42
-38
lines changed

libcxx/benchmarks/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ endfunction()
166166
# Register Benchmark tests
167167
#==============================================================================
168168
file(GLOB BENCHMARK_TESTS "*.bench.cpp")
169+
170+
if (NOT LIBCXX_ENABLE_INCOMPLETE_FEATURES)
171+
list(FILTER BENCHMARK_TESTS EXCLUDE REGEX "(format_to_n|format_to|format|formatted_size|formatter_float|std_format_spec_string_unicode).bench.cpp")
172+
endif()
173+
169174
foreach(test_path ${BENCHMARK_TESTS})
170175
get_filename_component(test_file "${test_path}" NAME)
171176
string(REPLACE ".bench.cpp" "" test_name "${test_file}")

libcxx/include/__debug

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
# define _LIBCPP_ASSERT_IMPL(x, m) ((void)0)
3030
#elif _LIBCPP_DEBUG_LEVEL == 1
3131
# define _LIBCPP_DEBUG_ASSERT(x, m) ((void)0)
32-
# define _LIBCPP_ASSERT_IMPL(x, m) ((x) ? (void)0 : _VSTD::__libcpp_debug_function(_VSTD::__libcpp_debug_info(__FILE__, __LINE__, #x, m)))
32+
# define _LIBCPP_ASSERT_IMPL(x, m) ((x) ? (void)0 : ::std::__libcpp_debug_function(::std::__libcpp_debug_info(__FILE__, __LINE__, #x, m)))
3333
#elif _LIBCPP_DEBUG_LEVEL == 2
34-
# define _LIBCPP_DEBUG_ASSERT(x, m) _LIBCPP_ASSERT(__libcpp_is_constant_evaluated() || (x), m)
35-
# define _LIBCPP_ASSERT_IMPL(x, m) ((x) ? (void)0 : _VSTD::__libcpp_debug_function(_VSTD::__libcpp_debug_info(__FILE__, __LINE__, #x, m)))
34+
# define _LIBCPP_DEBUG_ASSERT(x, m) _LIBCPP_ASSERT(::std::__libcpp_is_constant_evaluated() || (x), m)
35+
# define _LIBCPP_ASSERT_IMPL(x, m) ((x) ? (void)0 : ::std::__libcpp_debug_function(::std::__libcpp_debug_info(__FILE__, __LINE__, #x, m)))
3636
#else
3737
# error _LIBCPP_DEBUG_LEVEL must be one of 0, 1, 2
3838
#endif

libcxx/include/module.modulemap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// since __config may be included from C headers which may create an
33
// include cycle.
44
module std_config [system] [extern_c] {
5-
header "__config"
5+
textual header "__config"
6+
textual header "__config_site"
67
}
78

89
module std [system] {

libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
55

66
config.substitutions.append(('%{flags}', '--driver-mode=g++'))
77
config.substitutions.append(('%{compile_flags}',
8-
'-nostdinc++ -isystem %{include} -isystem %{target-include} -I %{libcxx}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX'
8+
'-nostdinc++ -isystem %{include} -isystem %{target-include} -I %{libcxx}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS'
99
))
1010
config.substitutions.append(('%{link_flags}',
1111
'-nostdlib -L %{lib} -lc++ -lmsvcrt -lmsvcprt -loldnames'

libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
55

66
config.substitutions.append(('%{flags}', '--driver-mode=g++'))
77
config.substitutions.append(('%{compile_flags}',
8-
'-nostdinc++ -isystem %{include} -isystem %{target-include} -I %{libcxx}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX'
8+
'-nostdinc++ -isystem %{include} -isystem %{target-include} -I %{libcxx}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS'
99
))
1010
config.substitutions.append(('%{link_flags}',
1111
'-nostdlib -L %{lib} -llibc++ -lmsvcrt -lmsvcprt -loldnames'

libcxx/test/libcxx/algorithms/debug_less.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
struct DebugException {};
1818

19+
// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined
1920
#define _LIBCPP_DEBUG 0
2021
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : throw ::DebugException())
2122

libcxx/test/libcxx/debug/debug_abort.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DEBUG=0
9+
// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCPP_DEBUG=0
1010
// UNSUPPORTED: libcxx-no-debug-mode
1111

1212
// Test that the default debug handler aborts the program.

libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/db_deallocate.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
int AssertCount = 0;
1818

19+
// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined
1920
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : (void)::AssertCount++)
2021
#define _LIBCPP_DEBUG 0
2122
#include <experimental/memory_resource>

libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/db_deallocate.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
int AssertCount = 0;
1818

19+
// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined
1920
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : (void)::AssertCount++)
2021
#define _LIBCPP_DEBUG 0
2122
#include <experimental/memory_resource>

libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/iterator_db.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// UNSUPPORTED: windows
1111
// UNSUPPORTED: libcxx-no-debug-mode
1212

13-
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DEBUG=0
13+
// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCPP_DEBUG=0
1414

1515
// <filesystem>
1616

0 commit comments

Comments
 (0)