This is an archive of the discontinued LLVM Phabricator instance.

[cmake] Fix clang-cl cross-compilation on macOS
ClosedPublic

Authored by smeenai on Dec 13 2017, 6:57 PM.

Details

Summary

macOS paths usually start with /Users, which clang-cl interprets as a
macro undefine, leading to pretty much everything failing to compile.

CMake should be taught to put a -- in its compilation rules for clang-cl
(and I've been meaning to submit that upstream for a while). In the
meantime, however, and to support older CMake versions, we can just
create a custom make rules override to fix the compilation rules.

Event Timeline

smeenai created this revision.Dec 13 2017, 6:57 PM
compnerd accepted this revision.Dec 14 2017, 4:51 PM

This is awesome!

This revision is now accepted and ready to land.Dec 14 2017, 4:51 PM
This revision was automatically updated to reflect the committed changes.