This is an archive of the discontinued LLVM Phabricator instance.

[cmake] Move CMAKE_(C|CXX)_COMPILER variables before CROSS_TOOLCHAIN_FLAGS so they can be overridden when cross compiling.
ClosedPublic

Authored by hintonda on Dec 6 2017, 7:03 AM.

Details

Summary

Since CROSS_TOOLCHAN_FLAGS can set CMAKE_(C|CXX)_COMPILER
variables, move the compiler variables up front so they can be
overridden.

This is a followup to https://reviews.llvm.org/D40229 committed in rL319620.

Thanks to Pavel Labath for reporting this issue.

Diff Detail

Repository
rL LLVM

Event Timeline

hintonda created this revision.Dec 6 2017, 7:03 AM
labath edited edge metadata.Dec 6 2017, 7:17 AM

Thank you for fixing this on such a short notice.

If this were up to me I'd also move ${build_type_flags} and ${linker_flag} before the CROSS_TOOLCHAIN_FLAGS but that's not my immediate concern.

labath accepted this revision.Dec 6 2017, 7:17 AM
This revision is now accepted and ready to land.Dec 6 2017, 7:17 AM
This revision was automatically updated to reflect the committed changes.