brintos

brintos / llvm-project-archived public Read only

0
0
Text · 883 B · 8dd7a8a Raw
21 lines · cpp
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9// Test that _LIBCPP_FREESTANDING is not defined when -ffreestanding is not passed10// to the compiler but defined when -ffreestanding is passed to the compiler.11 12// RUN: %{cxx} %{flags} %{compile_flags} -fsyntax-only %s13// RUN: %{cxx} %{flags} %{compile_flags} -fsyntax-only -ffreestanding -DFREESTANDING %s14 15#include <__config>16 17#if defined(FREESTANDING) != defined(_LIBCPP_FREESTANDING)18#error _LIBCPP_FREESTANDING should be defined in freestanding mode and not \19       defined in non-freestanding mode20#endif21