This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Fix MIPSr6 build for compiler-rt
ClosedPublic

Authored by wzssyqa on Oct 11 2022, 6:29 PM.

Details

Summary

The current version pass -mips64r2 or -mips32r2 options,
which make it failed to build on r6 platform.

In this patch: we detect whether we are MIPSr6 by

_MIPS_ARCH_MIPS32R6/_MIPS_ARCH_MIPS64R6

The out and install path is set to the default triple instead of
hardcoded one, since the clang ask for it.

Diff Detail

Event Timeline

wzssyqa created this revision.Oct 11 2022, 6:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2022, 6:29 PM
wzssyqa requested review of this revision.Oct 11 2022, 6:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2022, 6:29 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
wzssyqa updated this revision to Diff 466991.Oct 11 2022, 6:31 PM
MaskRay added inline comments.Oct 11 2022, 9:44 PM
compiler-rt/cmake/base-config-ix.cmake
221

Just delete commented-out code?

wzssyqa updated this revision to Diff 468018.Oct 15 2022, 7:44 AM
wzssyqa added inline comments.
compiler-rt/cmake/base-config-ix.cmake
221

Done.

keep the comment about N32.

wzssyqa marked an inline comment as done.Oct 15 2022, 7:47 AM
MaskRay retitled this revision from compiler-rt: fix MIPSr6 build to [CMake] Fix MIPSr6 build for compiler-rt.Oct 17 2022, 9:45 PM
This revision was not accepted when it landed; it landed in state Needs Review.Oct 17 2022, 9:49 PM
This revision was automatically updated to reflect the committed changes.