This is an archive of the discontinued LLVM Phabricator instance.

[cmake] Only pass CMAKE_SYSROOT if non-empty
ClosedPublic

Authored by smeenai on Dec 6 2017, 5:14 PM.

Details

Summary

In my build environment (cmake 3.6.1 and gcc 4.8.5 on CentOS 7), having
an empty CMAKE_SYSROOT in the cache results in --sysroot="" being passed
to all compile commands, and then the compiler errors out because of the
empty sysroot. Only set CMAKE_SYSROOT if non-empty to avoid this.

Diff Detail

Repository
rL LLVM

Event Timeline

smeenai created this revision.Dec 6 2017, 5:14 PM
beanz accepted this revision.Dec 8 2017, 11:32 AM

LGTM

This revision is now accepted and ready to land.Dec 8 2017, 11:32 AM
This revision was automatically updated to reflect the committed changes.