This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Explicitly set an empty --sysroot in the test
ClosedPublic

Authored by rogfer01 on Sep 12 2018, 3:28 AM.

Details

Summary

In rL341655 we added additional behaviour to the Driver for riscv32-unknown-elf when the sysroot is empty.

The new tests that check the new behaviour expect that the absence of --sysroot in the command-line implies that the sysroot empty. This doesn't hold if clang is built with a non-empty DEFAULT_SYSROOT in cmake. When this is the case, this test fails.

Since the new behaviour is triggered when the sysroot is empty, pass an empty --sysroot to avoid using the default (if any).

Diff Detail

Repository
rC Clang

Event Timeline

rogfer01 created this revision.Sep 12 2018, 3:28 AM
lewis-revill accepted this revision.Sep 12 2018, 7:35 AM

The reasoning seems sound for this testcase change. I think the behaviour of computeSysRoot() makes sense under this condition since it follows what the user specified, it's just not something I thought of when writing the tests for the previous patch.

Thanks

This revision is now accepted and ready to land.Sep 12 2018, 7:35 AM

Thanks for the review!

@asb @kristina can we get this committed?

I can commit it.

Great, go ahead.

Thanks I will do it shortly.

This revision was automatically updated to reflect the committed changes.