-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[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
[Embedded] Add armv4t to list of recognized architectures #73005
Conversation
@swift-ci please build toolchain |
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally this looks fine to me; @kubamracek is there any other spots that need to be changed such that we ship a armv4 stdlib?
@@ -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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
@@ -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" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
Very nice! 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I have a similar patch locally!
This adds armv4t as a recognized embedded architecture and builds a stdlib module for it.
Since LLVM natively supports armv4t, this is all that's needed to write Swift for the Game Boy Advance, if you combine it with the GBA LLVM toolkit from https://github.com/stuij/gba-llvm-devkit.