Roger Ferrer Ibanez 0158aaf614 Export the required symbol from DynamicLibraryTests
Running unittests/Support/DynamicLibrary/DynamicLibraryTests fails
when LLVM is configured with -DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON, because
the test's version script only contains symbols extracted from the static libraries,
that the test links with, but not those from the main object/executable itself.

The patch moves the one symbol, needed by the test, to a static library.

Fixes https://bugs.llvm.org/show_bug.cgi?id=32893

Patch by Momchil Velikov.

Differential Revision: https://reviews.llvm.org/D33789



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305181 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-12 07:22:15 +00:00

35 lines
841 B
C++

//===- llvm/unittest/Support/DynamicLibrary/PipSqueak.h -------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#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
#ifdef _WIN32
#define PIPSQUEAK_EXPORT __declspec(dllexport)
#else
#define PIPSQUEAK_EXPORT
#endif
extern "C" PIPSQUEAK_EXPORT const char *TestA();
#endif