mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
Quick fix for -DBUILD_SHARED_LIBS=on build after rL341502
libLLVMTestingSupport.so references a symbol in utils/unittest/UnitTestMain/TestMain.cpp (a layering issue) and will cause a link error because of -Wl,-z,defs (cmake/modules/HandleLLVMOptions.cmake) Waiting zturner for a better fix. llvm-svn: 341580
This commit is contained in:
parent
ecf8dee5a3
commit
8d4e05f4f6
@ -56,7 +56,7 @@ void PrintTo(const ExpectedHolder<T> &Item, std::ostream *Out) {
|
||||
} // namespace detail
|
||||
|
||||
namespace unittest {
|
||||
SmallString<128> getInputFileDirectory();
|
||||
SmallString<128> getInputFileDirectory(const char *Argv0);
|
||||
}
|
||||
} // namespace llvm
|
||||
|
||||
|
@ -13,10 +13,8 @@
|
||||
using namespace llvm;
|
||||
using namespace llvm::unittest;
|
||||
|
||||
extern const char *TestMainArgv0;
|
||||
|
||||
SmallString<128> llvm::unittest::getInputFileDirectory() {
|
||||
llvm::SmallString<128> Result = llvm::sys::path::parent_path(TestMainArgv0);
|
||||
SmallString<128> llvm::unittest::getInputFileDirectory(const char *Argv0) {
|
||||
llvm::SmallString<128> Result = llvm::sys::path::parent_path(Argv0);
|
||||
llvm::sys::fs::make_absolute(Result);
|
||||
llvm::sys::path::append(Result, "llvm.srcdir.txt");
|
||||
|
||||
|
@ -23,8 +23,10 @@
|
||||
using namespace llvm;
|
||||
using namespace llvm::pdb;
|
||||
|
||||
extern const char *TestMainArgv0;
|
||||
|
||||
TEST(NativeSymbolReuseTest, GlobalSymbolReuse) {
|
||||
SmallString<128> InputsDir = unittest::getInputFileDirectory();
|
||||
SmallString<128> InputsDir = unittest::getInputFileDirectory(TestMainArgv0);
|
||||
llvm::sys::path::append(InputsDir, "empty.pdb");
|
||||
|
||||
std::unique_ptr<IPDBSession> S;
|
||||
@ -51,7 +53,7 @@ TEST(NativeSymbolReuseTest, GlobalSymbolReuse) {
|
||||
}
|
||||
|
||||
TEST(NativeSymbolReuseTest, CompilandSymbolReuse) {
|
||||
SmallString<128> InputsDir = unittest::getInputFileDirectory();
|
||||
SmallString<128> InputsDir = unittest::getInputFileDirectory(TestMainArgv0);
|
||||
llvm::sys::path::append(InputsDir, "empty.pdb");
|
||||
|
||||
std::unique_ptr<IPDBSession> S;
|
||||
@ -93,7 +95,7 @@ TEST(NativeSymbolReuseTest, CompilandSymbolReuse) {
|
||||
}
|
||||
|
||||
TEST(NativeSymbolReuseTest, CompilandSymbolReuseBackwards) {
|
||||
SmallString<128> InputsDir = unittest::getInputFileDirectory();
|
||||
SmallString<128> InputsDir = unittest::getInputFileDirectory(TestMainArgv0);
|
||||
llvm::sys::path::append(InputsDir, "empty.pdb");
|
||||
|
||||
std::unique_ptr<IPDBSession> S;
|
||||
|
Loading…
Reference in New Issue
Block a user