This is an archive of the discontinued LLVM Phabricator instance.

[llvm-rc] Support absolute filenames in manifests
ClosedPublic

Authored by phosek on Nov 6 2018, 6:14 PM.

Details

Summary

CMake generate manifests that contain absolute filenames and these
currently result in assertion error. This change ensures that we
handle these correctly.

Diff Detail

Repository
rL LLVM

Event Timeline

phosek created this revision.Nov 6 2018, 6:14 PM

Looks ok to me.

Is it possible to construct a test for this somehow? We don't know the absolute paths on the system running the tests, but can we e.g. do something like echo "INCLUDE %p/Inputs/somefile" > %t.rc in order to exercise it?

phosek updated this revision to Diff 173104.Nov 7 2018, 5:44 PM

Test added.

mstorsjo accepted this revision.Nov 8 2018, 1:10 AM

LGTM

llvm/test/tools/llvm-rc/absolute.test
5 ↗(On Diff #173104)

The negative check for assertion might be a bit overkill, as a failed assert would make the llvm-rc command itself fail (a plain ; RUN: llvm-rc %t.rc to see that it can successfully compile that file would be enough), but I don't mind this either.

This revision is now accepted and ready to land.Nov 8 2018, 1:10 AM
phosek updated this revision to Diff 173240.Nov 8 2018, 3:44 PM
phosek marked an inline comment as done.
This revision was automatically updated to reflect the committed changes.