Commit f8b65292 authored by Louis Dionne's avatar Louis Dionne
Browse files

[libc++] Translate MODULES_DEFINES annotations to ADDITIONAL_COMPILE_FLAGS

This allows both the old and the new testing formats to handle these
tests with modules enabled.

We also include the modules flags in the %{flags} substitution, which
means that .sh.cpp tests in the old format and all tests in the new
format will use modules flags when enabled.
parent a19a56f6
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -24,10 +24,8 @@

// REQUIRES: verify-support

// MODULES_DEFINES: _LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
// MODULES_DEFINES: _LIBCPP_DISABLE_DEPRECATION_WARNINGS
#define _LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS

#include <algorithm>
#include <vector>
+1 −2
Original line number Diff line number Diff line
@@ -21,8 +21,7 @@
// UNSUPPORTED: c++98, c++03, c++11
// REQUIRES: verify-support

// MODULES_DEFINES: _LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
#define _LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE

#include <algorithm>
#include <cstddef>
+1 −4
Original line number Diff line number Diff line
@@ -11,10 +11,7 @@
// Test that including <atomic> fails to compile when _LIBCPP_HAS_NO_THREADS
// is defined.

// MODULES_DEFINES: _LIBCPP_HAS_NO_THREADS
#ifndef _LIBCPP_HAS_NO_THREADS
#define _LIBCPP_HAS_NO_THREADS
#endif
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_HAS_NO_THREADS

#include <atomic>

+1 −2
Original line number Diff line number Diff line
@@ -8,14 +8,13 @@
// UNSUPPORTED: c++98, c++03
// UNSUPPORTED: windows

// MODULES_DEFINES: _LIBCPP_DEBUG=1
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DEBUG=1

// Can't test the system lib because this test enables debug mode
// UNSUPPORTED: with_system_cxx_lib

// test array<T, 0>::front() raises a debug error.

#define _LIBCPP_DEBUG 1
#include <array>
#include "test_macros.h"
#include "debug_mode_helper.h"
+1 −2
Original line number Diff line number Diff line
@@ -8,14 +8,13 @@
// UNSUPPORTED: c++98, c++03
// UNSUPPORTED: windows

// MODULES_DEFINES: _LIBCPP_DEBUG=1
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DEBUG=1

// Can't test the system lib because this test enables debug mode
// UNSUPPORTED: with_system_cxx_lib

// test array<T, 0>::front() raises a debug error.

#define _LIBCPP_DEBUG 1
#include <array>
#include "test_macros.h"
#include "debug_mode_helper.h"
Loading