[llvm-rc] Support absolute filenames in manifests
ClosedPublic

Authored by phosek on Tue, Nov 6, 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
phosek created this revision.Tue, Nov 6, 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.Wed, Nov 7, 5:44 PM

Test added.

mstorsjo accepted this revision.Thu, Nov 8, 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.Thu, Nov 8, 1:10 AM
phosek updated this revision to Diff 173240.Thu, Nov 8, 3:44 PM
phosek marked an inline comment as done.
This revision was automatically updated to reflect the committed changes.