
Cygwin returns -1 for `getconf(_SC_ARG_MAX)`, which makes `llvm::sys::commandLineFitsWithinSystemLimits` always return true, so skip the `ArgumentLimit` test in that case. Skip the `ArgumentLimitWindows` and `ResponseFileWindows` tests on Cygwin also as it doesn't suffer from the Windows limits either. Cygwin requires the same `dllexport` annotation as Win32 in the `DynamicLibrary` test, so add its preprocessor check to PipSqueak.h. Cygwin's `getcwd` function does not fail with `ENOENT` if the current working directory is unlinked. According to POSIX issue 8, this is not required. Skip the `PhysicalFileSystemWorkingDirFailure` test on Cygwin as it relies on this behavior.
36 lines
989 B
C++
36 lines
989 B
C++
//===- llvm/unittest/Support/DynamicLibrary/PipSqueak.h -------------------===//
|
|
//
|
|
// 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_PIPSQUEAK_H
|
|
#define LLVM_PIPSQUEAK_H
|
|
|
|
#if defined(_WIN32) && !defined(__GNUC__)
|
|
// Disable warnings from inclusion of xlocale & exception
|
|
#pragma warning(push)
|
|
#pragma warning(disable: 4530)
|
|
#pragma warning(disable: 4577)
|
|
#include <string>
|
|
#include <vector>
|
|
#pragma warning(pop)
|
|
#else
|
|
#include <string>
|
|
#include <vector>
|
|
#endif
|
|
|
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
|
#define PIPSQUEAK_EXPORT __declspec(dllexport)
|
|
#elif defined(__MVS__)
|
|
#define PIPSQUEAK_EXPORT __attribute__((__visibility__("default")))
|
|
#else
|
|
#define PIPSQUEAK_EXPORT
|
|
#endif
|
|
|
|
extern "C" PIPSQUEAK_EXPORT const char *TestA();
|
|
|
|
#endif
|