This is an archive of the discontinued LLVM Phabricator instance.

[libunwind] Permit additional compiler and linker flags to be passed to tests.
ClosedPublic

Authored by bsdjhb on Feb 21 2018, 10:15 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

bsdjhb created this revision.Feb 21 2018, 10:15 AM
bsdjhb updated this revision to Diff 135285.Feb 21 2018, 10:16 AM
  • Unexpand tabs.

@sdardis requested this functionality in the review of D39074. Simon, can you confirm that this works for you in your testing?

This works as expected with your corresponding libcxx patch. However @arichardson 's D42139 does similar things for libcxx. We should wait for that to land, and ensure that this patch is rebased against that.

CMakeLists.txt
142 ↗(On Diff #135285)

PATH should be STRING.

test/lit.site.cfg.in
25 ↗(On Diff #135285)

This should be test_compiler_cflags.

bsdjhb updated this revision to Diff 135714.Feb 23 2018, 3:09 PM
  • Use STRING instead of PATH.
  • Update for committed libcxx change.
bsdjhb marked 2 inline comments as done.Feb 23 2018, 3:10 PM

My only question is if this should be named LIBUNWIND_TEST_COMPILER_FLAGS to match the name used in libc++?

sdardis accepted this revision.Feb 26 2018, 7:40 AM

My only question is if this should be named LIBUNWIND_TEST_COMPILER_FLAGS to match the name used in libc++?

I would say yes for the sake of consistency with the option it's controls and libcxx. Additionally, we also require config.test_linker_flags to be set as well, so we need LIBUNWIND_LINKER_FLAGS.

LGTM with those two additional changes. I've tested it with your N32 patch and it works.

This revision is now accepted and ready to land.Feb 26 2018, 7:40 AM
bsdjhb updated this revision to Diff 136098.Feb 27 2018, 10:22 AM
  • Match names used in libcxx and add LINKER_FLAGS.
bsdjhb retitled this revision from [libunwind] Permit additional compiler flags to be passed to tests. to [libunwind] Permit additional compiler and linker flags to be passed to tests..Feb 27 2018, 10:39 AM
bsdjhb edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.