This is an archive of the discontinued LLVM Phabricator instance.

Pass unittest binary name to getInputFileDirectory() for NativeSymbolReuseTest
AbandonedPublic

Authored by dschuff on Sep 6 2018, 11:38 AM.

Details

Reviewers
zturner
Summary

r341502 added an extern declaration of TestMainArgv0 in
testing/Support/SupportHelpers.cpp; It is defined in libgtest_main,
which broke the BUILD_SHARED_LIBS build of LLVM.

So pass the unittest binary name as a parameter instead of using it directly from the helper function.

Diff Detail

Event Timeline

dschuff created this revision.Sep 6 2018, 11:38 AM

I think we can also get around this by just passing the arg as a parameter.
Alternatively, this library is trivially small, we could force it to be
statically linked

dschuff updated this revision to Diff 164284.Sep 6 2018, 2:00 PM
  • Pass the binary name as a parameter instead

Passing it as a parameter does sound better.

dschuff retitled this revision from Add libgtest_main as a dependency of libLLVMTestingSupport to Pass unittest binary name to getInputFileDirectory() for NativeSymbolReuseTest.Sep 6 2018, 2:03 PM
dschuff edited the summary of this revision. (Show Details)

I think someone else already fixed this, can you check?

dschuff added a comment.EditedSep 6 2018, 2:10 PM

Yeah, rL341580 looks almost identical to this.

dschuff abandoned this revision.Sep 6 2018, 2:11 PM