[PATCH] Use fragile ObjC runtime by default for 32-bit Mac OS X

Rafael EspĂ­ndola rafael.espindola at gmail.com
Sat Jul 26 06:27:04 PDT 2014


ccing Iain

On 17 July 2014 02:20, Stephen Drake <steve at synergyconsultingnz.com> wrote:
> Hi,
>
> I'm attaching a patch to select the fragile Objective-C runtime by default for 32-bit Mac OS X, in accordance with Apple's documentation:
> https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtVersionsPlatforms.html
>
> In particular, this changes the default runtime for 32-bit ppc, since x86 was already checked for specifically.
>
> Having written this up I now see that a very similar change was proposed some months ago:
> http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140120/097716.html
>
> There was some discussion about the test case there - presumably that wasn't resolved?
>
> Cheers,
> Steve
>
>
> Index: lib/Driver/ToolChains.h
> ===================================================================
> --- lib/Driver/ToolChains.h     (revision 213217)
> +++ lib/Driver/ToolChains.h     (working copy)
> @@ -272,8 +272,8 @@
>    }
>
>    bool IsObjCNonFragileABIDefault() const override {
> -    // Non-fragile ABI is default for everything but i386.
> -    return getTriple().getArch() != llvm::Triple::x86;
> +    // Non-fragile ABI is default for everything except 32-bit OS X.
> +    return !(getTriple().isMacOSX() && getTriple().isArch32Bit());
>    }
>
>    bool UseObjCMixedDispatch() const override {
> Index: test/Driver/darwin-objc-defaults.m
> ===================================================================
> --- test/Driver/darwin-objc-defaults.m  (revision 213217)
> +++ test/Driver/darwin-objc-defaults.m  (working copy)
> @@ -71,7 +71,7 @@
>  // RUN: FileCheck --check-prefix CHECK-CHECK-ARMV7_OSX10_5 < %t %s
>
>  // CHECK-CHECK-ARMV7_OSX10_5: "-cc1"
> -// CHECK-CHECK-ARMV7_OSX10_5: -fobjc-runtime=macosx-10.5
> +// CHECK-CHECK-ARMV7_OSX10_5: -fobjc-runtime=macosx-fragile-10.5
>  // CHECK-CHECK-ARMV7_OSX10_5-NOT: -fobjc-dispatch-method
>  // CHECK-CHECK-ARMV7_OSX10_5: darwin-objc-defaults
>
> @@ -80,7 +80,7 @@
>  // RUN: FileCheck --check-prefix CHECK-CHECK-ARMV7_OSX10_6 < %t %s
>
>  // CHECK-CHECK-ARMV7_OSX10_6: "-cc1"
> -// CHECK-CHECK-ARMV7_OSX10_6: -fobjc-runtime=macosx-10.6
> +// CHECK-CHECK-ARMV7_OSX10_6: -fobjc-runtime=macosx-fragile-10.6
>  // CHECK-CHECK-ARMV7_OSX10_6-NOT: -fobjc-dispatch-method
>  // CHECK-CHECK-ARMV7_OSX10_6: darwin-objc-defaults
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>



More information about the cfe-commits mailing list