mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 19:06:38 +00:00

When building Flang with Clang, we need to do the same quadmath.h wrapping as we do for flang-rt. I extracted the CMake code into FlangCommon.cmake, and cleaned up the arguments passing to execute_process (note that `-###` was treated as `-` in the original code, because `#` starts a comment). I believe the Clang command does not require the input source file, so I removed it as well.
24 lines
761 B
C
24 lines
761 B
C
/*===-- cmake/quadmath_wrapper.h.in ---------------------=-----------*- C -*-===
|
|
*
|
|
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
* See https://llvm.org/LICENSE.txt for license information.
|
|
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
*
|
|
*===----------------------------------------------------------------------===*/
|
|
|
|
#ifdef __clang_major__
|
|
/*
|
|
* _Complex inside quadmath.h triggers c99-extension warnings,
|
|
* when this header file is included into a C++ file.
|
|
* Disable them just during the inclusion of quadmath.h.
|
|
*/
|
|
#pragma clang diagnostic push
|
|
#pragma clang diagnostic ignored "-Wc99-extensions"
|
|
#endif
|
|
|
|
#include ${FLANG_INCLUDE_QUADMATH_H}
|
|
|
|
#ifdef __clang_major__
|
|
#pragma clang diagnostic pop
|
|
#endif
|