This is an archive of the discontinued LLVM Phabricator instance.

[libc] Normalize LIBC_TARGET_MACHINE
ClosedPublic

Authored by gchatelet on Apr 29 2021, 5:23 AM.

Details

Summary

Current implementation defines LIBC_TARGET_MACHINE with the use of CMAKE_SYSTEM_PROCESSOR.
Unfortunately CMAKE_SYSTEM_PROCESSOR is OS dependent and can produce different results.
An evidence of this is the various matchers used to detect whether the architecture is x86.

This patch normalizes LIBC_TARGET_MACHINE and renames it LIBC_TARGET_ARCHITECTURE.
I've added many architectures but we may want to limit ourselves to x86 and ARM.

Diff Detail

Event Timeline

gchatelet created this revision.Apr 29 2021, 5:23 AM
gchatelet requested review of this revision.Apr 29 2021, 5:23 AM
gchatelet updated this revision to Diff 341482.Apr 29 2021, 5:28 AM
  • Remove unrelated change
Harbormaster completed remote builds in B101616: Diff 341482.

@sivachandra do you mind having a look?

sivachandra accepted this revision.May 5 2021, 8:29 AM

Sorry I missed this.

This revision is now accepted and ready to land.May 5 2021, 8:29 AM
This revision was automatically updated to reflect the committed changes.
libc/src/string/CMakeLists.txt