teak-llvm/llvm/unittests/Support/DynamicLibrary/ExportedFuncs.cxx
Roger Ferrer Ibanez 2cd536c705 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

llvm-svn: 305181
2017-06-12 07:22:15 +00:00

17 lines
533 B
C++

//===- llvm/unittest/Support/DynamicLibrary/DynamicLibraryLib.cpp ---------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "PipSqueak.h"
#ifndef PIPSQUEAK_TESTA_RETURN
#define PIPSQUEAK_TESTA_RETURN "ProcessCall"
#endif
extern "C" PIPSQUEAK_EXPORT const char *TestA() { return PIPSQUEAK_TESTA_RETURN; }