Skip to content

[Embedded] Add armv4t to list of recognized architectures #73005

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmake/modules/SwiftSetIfArchBitness.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ function(set_if_arch_bitness var_name)
if("${SIA_ARCH}" STREQUAL "i386" OR
"${SIA_ARCH}" STREQUAL "i686" OR
"${SIA_ARCH}" STREQUAL "x86" OR
"${SIA_ARCH}" STREQUAL "armv4t" OR
"${SIA_ARCH}" STREQUAL "armv5" OR
"${SIA_ARCH}" STREQUAL "armv6" OR
"${SIA_ARCH}" STREQUAL "armv6m" OR
Expand Down
2 changes: 2 additions & 0 deletions lib/IDETool/CompilerInvocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ static std::string adjustClangTriple(StringRef TripleStr) {
OS << "armv5"; break;
case llvm::Triple::SubArchType::ARMSubArch_v5te:
OS << "armv5te"; break;
case llvm::Triple::SubArchType::ARMSubArch_v4t:
OS << "armv4t"; break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this work more generally for armv4? are there other embedded cpus that would be good examples?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose I could add armv4, but I don’t have any readily available armv4 hardware that I can test against. It probably works just fine though.

default:
// Adjust i386-macosx to x86_64 because there is no Swift stdlib for i386.
if ((Triple.getOS() == llvm::Triple::MacOSX ||
Expand Down
1 change: 1 addition & 0 deletions stdlib/public/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ if(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB)
# the following are all ELF targets
if("ARM" IN_LIST LLVM_TARGETS_TO_BUILD)
list(APPEND EMBEDDED_STDLIB_TARGET_TRIPLES
"armv4t armv4t-none-none-eabi armv4t-none-none-eabi"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the GBA llvm toolchain elf based?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, GBA ROMs are ELF

"armv6 armv6-none-none-eabi armv6-none-none-eabi"
"armv6m armv6m-none-none-eabi armv6m-none-none-eabi"
"armv7 armv7-none-none-eabi armv7-none-none-eabi"
Expand Down