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 Answers2

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)

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.