15 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// This test ensures that we can add compile flags that are conditional on Lit features.10 11// ADDITIONAL_COMPILE_FLAGS(some-defined-feature): -this-flag-should-be-added12// ADDITIONAL_COMPILE_FLAGS(some-undefined-feature): -this-flag-should-not-be-added13// RUN: echo "%{compile_flags}" | grep -e '-this-flag-should-be-added'14// RUN: echo "%{compile_flags}" | grep -v -e '-this-flag-should-not-be-added'15