Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions libcxx/test/benchmarks/spec.gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# RUN: mkdir -p %{temp}
# RUN: echo "%{cxx}" > %{temp}/cxx.subs
# RUN: echo "%{compile_flags}" > %{temp}/compile_flags.subs
# RUN: echo "%{flags}" > %{temp}/flags.subs
# RUN: echo "%{common_flags}" > %{temp}/common_flags.subs
# RUN: echo "%{link_flags}" > %{temp}/link_flags.subs
# RUN: echo "%{spec_dir}" > %{temp}/spec_dir.subs
# RUN: %{python} %s %{temp}
Expand All @@ -24,7 +24,7 @@
test_dir = pathlib.Path(sys.argv[1])
cxx = (test_dir / 'cxx.subs').open().read().strip()
compile_flags = (test_dir / 'compile_flags.subs').open().read().strip()
flags = (test_dir / 'flags.subs').open().read().strip()
common_flags = (test_dir / 'common_flags.subs').open().read().strip()
link_flags = (test_dir / 'link_flags.subs').open().read().strip()
spec_dir = pathlib.Path((test_dir / 'spec_dir.subs').open().read().strip())

Expand All @@ -46,7 +46,7 @@
copies = 1
threads = 1
CC = cc -O3 -std=c18 -Wno-implicit-function-declaration
CXX = {cxx} {compile_flags} {flags} {link_flags} -Wno-error
CXX = {cxx} {compile_flags} {common_flags} {link_flags} -Wno-error
CC_VERSION_OPTION = --version
CXX_VERSION_OPTION = --version
EXTRA_PORTABILITY = -DSPEC_NO_CXX17_SPECIAL_MATH_FUNCTIONS # because libc++ doesn't implement the special math functions yet
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/configs/amdgpu-libc++-shared.cfg.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')

config.substitutions.append(('%{flags}',
config.substitutions.append(('%{common_flags}',
f'--target={config.target_triple} -Wno-multi-gpu -flto -mcpu=native'))
config.substitutions.append(('%{compile_flags}',
'-nogpulib -fno-builtin-printf -I %{include-dir} '
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/configs/apple-libc++-shared.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ADDITIONAL_PARAMETERS = [
"""),
]

config.substitutions.append(('%{flags}',
config.substitutions.append(('%{common_flags}',
'-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
))
config.substitutions.append(('%{compile_flags}',
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/configs/apple-libc++-system.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import libcxx.test.params, libcxx.test.config, libcxx.test.dsl

lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')

config.substitutions.append(('%{flags}',
config.substitutions.append(('%{common_flags}',
'-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
))
config.substitutions.append(('%{compile_flags}',
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/configs/armv7m-picolibc-libc++.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')

libc_linker_script = '@CMAKE_INSTALL_PREFIX@/lib/picolibcpp.ld'

config.substitutions.append(('%{flags}', '--sysroot=@CMAKE_INSTALL_PREFIX@'))
config.substitutions.append(('%{common_flags}', '--sysroot=@CMAKE_INSTALL_PREFIX@'))

config.substitutions.append(('%{compile_flags}',
'-nostdinc++ -I %{include-dir} -I %{target-include-dir} -I %{libcxx-dir}/test/support'
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/configs/ibm-libc++-shared.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if lit.util.isAIXTriple(config.target_triple):
# way to retrieve the AIX version in the driver.
config.target_triple = lit.util.addAIXVersion(config.target_triple)

config.substitutions.append(('%{flags}', '-pthread'))
config.substitutions.append(('%{common_flags}', '-pthread'))
config.substitutions.append(('%{compile_flags}',
'-nostdinc++ -D__LIBC_NO_CPP_MATH_OVERLOADS__ -I %{include-dir} -I %{libcxx-dir}/test/support'
))
Expand Down
6 changes: 3 additions & 3 deletions libcxx/test/configs/llvm-libc++-android.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import libcxx.test.android
import libcxx.test.config
import libcxx.test.params

config.substitutions.append(('%{flags}',
config.substitutions.append(('%{common_flags}',
'--sysroot @CMAKE_SYSROOT@' if '@CMAKE_SYSROOT@' else ''
))

Expand All @@ -27,8 +27,8 @@ if re.match(r'i686-linux-android(21|22|23)$', config.target_triple):
compile_flags += ' -mstackrealign'
config.substitutions.append(('%{compile_flags}', compile_flags))

# The platform library is called "libc++.so" and the NDK library is called "libc++_shared.so".
# Use LD_LIBRARY_PATH to find the libcxx shared object because older Bionic dynamic loaders
# The platform library is called "libc++.so" and the NDK library is called "libc++_shared.so".
# Use LD_LIBRARY_PATH to find the libcxx shared object because older Bionic dynamic loaders
# don't support rpath lookup.
config.substitutions.append(('%{link_flags}',
'-nostdlib++ -L %{lib-dir} -l@LIBCXX_SHARED_OUTPUT_NAME@'
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/configs/llvm-libc++-mingw.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')

config.substitutions.append(('%{flags}', ''))
config.substitutions.append(('%{common_flags}', ''))
config.substitutions.append(('%{compile_flags}',
'-nostdinc++ -I %{target-include-dir} -I %{include-dir} -I %{libcxx-dir}/test/support'
))
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if '@CMAKE_BUILD_TYPE@'.upper() == 'DEBUG':
fms_runtime_lib += '_dbg'
cxx_lib += 'd'

config.substitutions.append(('%{flags}', '--driver-mode=g++'))
config.substitutions.append(('%{common_flags}', '--driver-mode=g++'))
config.substitutions.append(('%{compile_flags}',
'-fms-runtime-lib=' + fms_runtime_lib + ' -nostdinc++ -I %{target-include-dir} -I %{include-dir} -I %{libcxx-dir}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX' + dbg_include
))
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/configs/llvm-libc++-shared-gcc.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')

config.substitutions.append(('%{flags}', '-pthread'))
config.substitutions.append(('%{common_flags}', '-pthread'))
config.substitutions.append(('%{compile_flags}',
'-nostdinc++ -I %{target-include-dir} -I %{include-dir} -I %{libcxx-dir}/test/support'
))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if '@CMAKE_BUILD_TYPE@'.upper() == 'DEBUG':
fms_runtime_lib += '_dbg'
cxx_lib += 'd'

config.substitutions.append(('%{flags}', '--driver-mode=g++'))
config.substitutions.append(('%{common_flags}', '--driver-mode=g++'))
config.substitutions.append(('%{compile_flags}',
'-fms-runtime-lib=' + fms_runtime_lib + ' -nostdinc++ -I %{include-dir} -I %{target-include-dir} -I %{libcxx-dir}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX -D_HAS_EXCEPTIONS=0' + dbg_include
))
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/configs/llvm-libc++-shared.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')

config.substitutions.append(('%{flags}',
config.substitutions.append(('%{common_flags}',
'-pthread' + (' -isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '')
))
config.substitutions.append(('%{compile_flags}',
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if '@CMAKE_BUILD_TYPE@'.upper() == 'DEBUG':
fms_runtime_lib += '_dbg'
cxx_lib += 'd'

config.substitutions.append(('%{flags}', '--driver-mode=g++'))
config.substitutions.append(('%{common_flags}', '--driver-mode=g++'))
config.substitutions.append(('%{compile_flags}',
'-fms-runtime-lib=' + fms_runtime_lib + ' -nostdinc++ -I %{target-include-dir} -I %{include-dir} -I %{libcxx-dir}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX' + dbg_include
))
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/configs/llvm-libc++-static.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')

config.substitutions.append(('%{flags}',
config.substitutions.append(('%{common_flags}',
'-pthread' + (' -isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '')
))
config.substitutions.append(('%{compile_flags}',
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/configs/nvptx-libc++-shared.cfg.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')

config.substitutions.append(('%{flags}',
config.substitutions.append(('%{common_flags}',
f'--target={config.target_triple} -Wno-multi-gpu -flto -march=native'))
config.substitutions.append(('%{compile_flags}',
'-nogpulib -fno-builtin-printf -I %{include-dir} '
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/configs/stdlib-libstdc++.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ LIBSTDCXX_PARAMETERS = [
]

# Configure the compiler and flags
config.substitutions.append(('%{flags}',
config.substitutions.append(('%{common_flags}',
'-pthread' + (' -isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '')
))
config.substitutions.append(('%{compile_flags}',
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/configs/stdlib-native.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')

config.substitutions.append(('%{flags}',
config.substitutions.append(('%{common_flags}',
'-pthread' + (' -isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '')
))
config.substitutions.append(('%{compile_flags}', '-I %{libcxx-dir}/test/support'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// NOTE: It's not common or recommended to have libc++ in the header search
// path when compiling C files, but it does happen often enough.

// RUN: %{cxx} -c -xc %s -fsyntax-only %{flags} %{compile_flags} -std=c99
// RUN: %{cxx} -c -xc %s -fsyntax-only %{common_flags} %{compile_flags} -std=c99

#include <__config>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
// Test that we encode the assertion semantic in an ABI tag to avoid ODR violations when linking TUs that have different
// values for it.

// RUN: %{cxx} %s %{flags} %{compile_flags} -c -DTU1 -U_LIBCPP_ASSERTION_SEMANTIC -D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_IGNORE -o %t.tu1.o
// RUN: %{cxx} %s %{flags} %{compile_flags} -c -DTU2 -U_LIBCPP_ASSERTION_SEMANTIC -D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_OBSERVE -o %t.tu2.o
// RUN: %{cxx} %s %{flags} %{compile_flags} -c -DTU3 -U_LIBCPP_ASSERTION_SEMANTIC -D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_QUICK_ENFORCE -o %t.tu3.o
// RUN: %{cxx} %s %{flags} %{compile_flags} -c -DTU4 -U_LIBCPP_ASSERTION_SEMANTIC -D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_ENFORCE -o %t.tu4.o
// RUN: %{cxx} %s %{flags} %{compile_flags} -c -DMAIN -o %t.main.o
// RUN: %{cxx} %t.tu1.o %t.tu2.o %t.tu3.o %t.tu4.o %t.main.o %{flags} %{link_flags} -o %t.exe
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -DTU1 -U_LIBCPP_ASSERTION_SEMANTIC -D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_IGNORE -o %t.tu1.o
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -DTU2 -U_LIBCPP_ASSERTION_SEMANTIC -D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_OBSERVE -o %t.tu2.o
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -DTU3 -U_LIBCPP_ASSERTION_SEMANTIC -D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_QUICK_ENFORCE -o %t.tu3.o
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -DTU4 -U_LIBCPP_ASSERTION_SEMANTIC -D_LIBCPP_ASSERTION_SEMANTIC=_LIBCPP_ASSERTION_SEMANTIC_ENFORCE -o %t.tu4.o
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -DMAIN -o %t.main.o
// RUN: %{cxx} %t.tu1.o %t.tu2.o %t.tu3.o %t.tu4.o %t.main.o %{common_flags} %{link_flags} -o %t.exe
// RUN: %{exec} %t.exe

#include "test_macros.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// Test that we encode whether exceptions are supported in an ABI tag to avoid
// ODR violations when linking TUs that have different values for it.

// RUN: %{cxx} %s %{flags} %{compile_flags} -c -DTU1 -fno-exceptions -o %t.tu1.o
// RUN: %{cxx} %s %{flags} %{compile_flags} -c -DTU2 -fexceptions -o %t.tu2.o
// RUN: %{cxx} %s %{flags} %{compile_flags} -c -DMAIN -o %t.main.o
// RUN: %{cxx} %t.tu1.o %t.tu2.o %t.main.o %{flags} %{link_flags} -o %t.exe
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -DTU1 -fno-exceptions -o %t.tu1.o
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -DTU2 -fexceptions -o %t.tu2.o
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -DMAIN -o %t.main.o
// RUN: %{cxx} %t.tu1.o %t.tu2.o %t.main.o %{common_flags} %{link_flags} -o %t.exe
// RUN: %{exec} %t.exe

#include "test_macros.h"
Expand Down
12 changes: 6 additions & 6 deletions libcxx/test/extensions/libcxx/odr_signature.hardening.sh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
// when linking TUs that have different values for it.

// Note that GCC doesn't support `-Wno-macro-redefined`.
// RUN: %{cxx} %s %{flags} %{compile_flags} -c -DTU1 -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST -o %t.tu1.o
// RUN: %{cxx} %s %{flags} %{compile_flags} -c -DTU2 -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -o %t.tu2.o
// RUN: %{cxx} %s %{flags} %{compile_flags} -c -DTU3 -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG -o %t.tu3.o
// RUN: %{cxx} %s %{flags} %{compile_flags} -c -DTU4 -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -o %t.tu4.o
// RUN: %{cxx} %s %{flags} %{compile_flags} -c -DMAIN -o %t.main.o
// RUN: %{cxx} %t.tu1.o %t.tu2.o %t.tu3.o %t.tu4.o %t.main.o %{flags} %{link_flags} -o %t.exe
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -DTU1 -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST -o %t.tu1.o
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -DTU2 -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -o %t.tu2.o
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -DTU3 -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG -o %t.tu3.o
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -DTU4 -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -o %t.tu4.o
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -DMAIN -o %t.main.o
// RUN: %{cxx} %t.tu1.o %t.tu2.o %t.tu3.o %t.tu4.o %t.main.o %{common_flags} %{link_flags} -o %t.exe
// RUN: %{exec} %t.exe

#include "test_macros.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
// In MSVC mode, the two anonymous types have identical type index in both object files.
// XFAIL: msvc

// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.tu1.o -DTU1 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=1
// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.tu2.o -DTU2 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=1
// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.main.o -DMAIN -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=1
// RUN: %{cxx} %t.tu1.o %t.tu2.o %t.main.o %{flags} %{link_flags} -o %t.exe
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -o %t.tu1.o -DTU1 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=1
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -o %t.tu2.o -DTU2 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=1
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -o %t.main.o -DMAIN -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=1
// RUN: %{cxx} %t.tu1.o %t.tu2.o %t.main.o %{common_flags} %{link_flags} -o %t.exe
// RUN: %{exec} %t.exe

#include <cassert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

// UNSUPPORTED: no-rtti

// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.tu1.o -DTU1 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=2
// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.tu2.o -DTU2 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=2
// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.main.o -DMAIN -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=2
// RUN: %{cxx} %t.tu1.o %t.tu2.o %t.main.o %{flags} %{link_flags} -o %t.exe
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -o %t.tu1.o -DTU1 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=2
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -o %t.tu2.o -DTU2 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=2
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -o %t.main.o -DMAIN -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=2
// RUN: %{cxx} %t.tu1.o %t.tu2.o %t.main.o %{common_flags} %{link_flags} -o %t.exe
// RUN: %{exec} %t.exe

#include <cassert>
Expand Down
4 changes: 2 additions & 2 deletions libcxx/test/libcxx-03/libcpp_freestanding.sh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// Test that _LIBCPP_FREESTANDING is not defined when -ffreestanding is not passed
// to the compiler but defined when -ffreestanding is passed to the compiler.

// RUN: %{cxx} %{flags} %{compile_flags} -fsyntax-only %s
// RUN: %{cxx} %{flags} %{compile_flags} -fsyntax-only -ffreestanding -DFREESTANDING %s
// RUN: %{cxx} %{common_flags} %{compile_flags} -fsyntax-only %s
// RUN: %{cxx} %{common_flags} %{compile_flags} -fsyntax-only -ffreestanding -DFREESTANDING %s

#include <__config>

Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/libcxx-03/module_std.gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"%{clang-tidy}",
"%{test-tools-dir}/clang_tidy_checks/libcxx-tidy.plugin",
"%{cxx}",
"%{flags} %{compile_flags}",
"%{common_flags} %{compile_flags}",
"std",
)

Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/libcxx-03/module_std_compat.gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"%{clang-tidy}",
"%{test-tools-dir}/clang_tidy_checks/libcxx-tidy.plugin",
"%{cxx}",
"%{flags} %{compile_flags}",
"%{common_flags} %{compile_flags}",
"std.compat",
)

Expand Down
6 changes: 3 additions & 3 deletions libcxx/test/libcxx-03/utilities/exception_guard.odr.sh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
// Make sure that we don't get ODR violations with __exception_guard when
// linking together TUs compiled with different values of -f[no-]exceptions.

// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.except.o -O1 -fexceptions
// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.noexcept.o -O1 -fno-exceptions
// RUN: %{cxx} %{flags} %{link_flags} -o %t.exe %t.except.o %t.noexcept.o
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -o %t.except.o -O1 -fexceptions
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -o %t.noexcept.o -O1 -fno-exceptions
// RUN: %{cxx} %{common_flags} %{link_flags} -o %t.exe %t.except.o %t.noexcept.o
// RUN: %{run}

#include <__cxx03/__utility/exception_guard.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
// First, test the test. Make sure that we do (incorrectly) produce a weak definition when we
// don't define _LIBCPP_DISABLE_AVAILABILITY. Otherwise, something may have changed in libc++
// and this test might not work anymore.
// RUN: %{cxx} %s %{flags} %{compile_flags} %{link_flags} -fvisibility=hidden -fvisibility-inlines-hidden -shared -o %t.1.dylib
// RUN: %{cxx} %s %{common_flags} %{compile_flags} %{link_flags} -fvisibility=hidden -fvisibility-inlines-hidden -shared -o %t.1.dylib
// RUN: nm -m %t.1.dylib | c++filt | grep value > %t.1.symbols
// RUN: grep weak %t.1.symbols

// Now, make sure that 'weak' goes away when we define _LIBCPP_DISABLE_AVAILABILITY.
// In fact, all references to the function might go away, so we just check that we don't emit
// any weak reference.
// RUN: %{cxx} %s %{flags} %{compile_flags} %{link_flags} -fvisibility=hidden -fvisibility-inlines-hidden -D_LIBCPP_DISABLE_AVAILABILITY -shared -o %t.2.dylib
// RUN: %{cxx} %s %{common_flags} %{compile_flags} %{link_flags} -fvisibility=hidden -fvisibility-inlines-hidden -D_LIBCPP_DISABLE_AVAILABILITY -shared -o %t.2.dylib
// RUN: nm -m %t.2.dylib | c++filt | grep value > %t.2.symbols
// RUN: not grep weak %t.2.symbols

Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// This test doesn't work as such on Windows.
// UNSUPPORTED: windows

// RUN: %{cxx} %{flags} %s -o %t.exe %{compile_flags} -g %{link_flags}
// RUN: %{cxx} %{common_flags} %s -o %t.exe %{compile_flags} -g %{link_flags}
// Ensure locale-independence for unicode tests.
// RUN: env LANG=en_US.UTF-8 %{gdb} -nx -batch -iex "set autoload off" -ex "source %S/../../../utils/gdb/libcxx/printers.py" -ex "python register_libcxx_printer_loader()" -ex "source %S/gdb_pretty_printer_test.py" %t.exe

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
// In MSVC mode, the two anonymous types have identical type index in both object files.
// XFAIL: msvc

// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.tu1.o -DTU1 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=1
// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.tu2.o -DTU2 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=1
// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.main.o -DMAIN -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=1
// RUN: %{cxx} %t.tu1.o %t.tu2.o %t.main.o %{flags} %{link_flags} -o %t.exe
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -o %t.tu1.o -DTU1 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=1
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -o %t.tu2.o -DTU2 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=1
// RUN: %{cxx} %s %{common_flags} %{compile_flags} -c -o %t.main.o -DMAIN -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=1
// RUN: %{cxx} %t.tu1.o %t.tu2.o %t.main.o %{common_flags} %{link_flags} -o %t.exe
// RUN: %{exec} %t.exe

#include <cassert>
Expand Down
Loading
Loading