This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Check -ffreestanding as C not C++ flag
ClosedPublic

Authored by phosek on Jul 13 2018, 6:01 PM.

Details

Summary

When -ffreestanding is used, main() isn't considered special and
when compiled as C++ code it'll get mangled which makes the
compilation fail since main() will be undefined so this check will
never succeed.

Diff Detail

Repository
rL LLVM

Event Timeline

phosek created this revision.Jul 13 2018, 6:01 PM
Herald added subscribers: Restricted Project, llvm-commits, mgorny. · View Herald TranscriptJul 13 2018, 6:01 PM
morehouse accepted this revision.Jul 16 2018, 9:17 AM
This revision is now accepted and ready to land.Jul 16 2018, 9:17 AM
This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.