0

A while ago, I discovered the ObjFW runtime for Objective-C, which is a pretty neat one and does a lot of things - and, is very tiny. But it made me ask lately, which runtimes are available on which targets - and how can one best find out? I'd like to use a small script in my configuration to test if I could use ObjFW on the current platform, with the current clang or gcc installation.

So is there a way to list the available Objective-C runtimes on either GCC or Clang?

2 Answers 2

1

Every GCC version starting 4.0 and basically every Clang version ever supports the ObjFW runtime at least partially. That is because the ObjFW runtime uses the GNU ABI, but adds more on top of that. In order to use what's added on top, you need a Clang version that accepts -fobjc-runtime=objfw. For a possible check, see configure.ac included in ObjFW.

This all is only relevant if you plan on using the runtime without the rest of ObjFW - if you also want to use the rest, just use objfw-config: It will do the right thing for oyu.

1

This isn't full answer for your question, but in clang documentation listed available runtimes: macosx, macosx-fragile, ios, watchos, gcc, gnustep and objfw.

To my mind, gnustep, gcc and objfw suitable for all targets, other for OS X, iOS and Watch OS only (because this runtimes a os-specific, but this's only my suggestion)

3
  • "This isn't full answer for your question" - Incomplete answers should be submitted as a comment instead of an answer. You should edit this answer so it answers the author's question. The question seems answerable without any additional information from the author (which is unlikely due to it being submitted in 2014).
    – Ramhound
    Oct 25, 2017 at 14:18
  • 2
    @Ramhound, I don't think so - author wanted to know about other runtimes, available for -fobj-runtime option and how to get them from GCC or Clang. I didn't answer for second part (so, this is a reason for incomplete answer), but answered for first part and this info may be a quite useful for other. Oct 25, 2017 at 15:05
  • I provided feedback on my vote. I won't repeat what I have already said. Please use restraint if you find yourself submitting incomplete answers in the future.
    – Ramhound
    Oct 25, 2017 at 15:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .