rust/compiler
Jonas Schievink fb92b70f95
Rollup merge of #77716 - francesca64:revert-ios-dynamic-linking, r=jonas-schievink
Revert "Allow dynamic linking for iOS/tvOS targets."

This reverts PR #73516.

On macOS I compile static libs for iOS, automated using [cargo-mobile](https://github.com/BrainiumLLC/cargo-mobile), which has worked smoothly for the past 2 years. However, upon updating to Rust 1.46.0, I was no longer able to use Rust on iOS. I've bisected this to the PR referenced above.

For most projects tested, apps now immediately crash with a message like this:
```
dyld: Library not loaded: /Users/francesca/Projects/example/target/aarch64-apple-ios/debug/deps/libexample.dylib
  Referenced from: /private/var/containers/Bundle/Application/745912AF-A928-465C-B340-872BD1C9F368/example.app/example
  Reason: image not found
dyld: launch, loading dependent libraries
DYLD_LIBRARY_PATH=/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib:/Developer/Library/PrivateFrameworks/GPUTools.framework/libglInterpose.dylib:/usr/lib/libMTLCapture.dylib
```

This can be reproduced by using cargo-mobile to generate a winit example project, and then attempting to run it on an iOS device (`cargo mobile init && cargo apple open`).

In our projects that depend on DisplayLink, the build instead fails with a linker error:
```
= note: Undefined symbols for architecture arm64:
            "_CACurrentMediaTime", referenced from:
                display_link::ios::run_callback_ios10::hda81197ff46aedbd in libapp-4f0abc1d7684103f.rlib(app-4f0abc1d7684103f.40d4iro0yz1iy487.rcgu.o)
                display_link::ios::run_callback_pre_ios10::h91f085da19374320 in libapp-4f0abc1d7684103f.rlib(app-4f0abc1d7684103f.40d4iro0yz1iy487.rcgu.o)
          ld: symbol(s) not found for architecture arm64
```

After reverting the change to enable dynamic linking on iOS, everything works the same as it did on Rust 1.45.2 for me.

In the future, would it be possible for me to be pinged when iOS-related PRs are made? I work for a company that intends on using Rust on iOS in production, so I'd gladly provide testing.

cc @aspenluxxxy
2020-10-24 14:11:59 +02:00
..
rustc
rustc_apfloat
rustc_arena Track element count only for types that need drop 2020-10-20 17:01:51 +02:00
rustc_ast Auto merge of #77250 - Aaron1011:feature/flat-token-collection, r=petrochenkov 2020-10-21 15:03:14 +00:00
rustc_ast_lowering
rustc_ast_passes
rustc_ast_pretty Drop unneeded mut 2020-10-20 16:42:51 +02:00
rustc_attr
rustc_builtin_macros
rustc_codegen_llvm Update to rustc-demangle 0.1.18 2020-10-21 21:11:11 +01:00
rustc_codegen_ssa
rustc_data_structures Auto merge of #77908 - bugadani:obl-forest, r=nnethercote 2020-10-19 15:14:15 +00:00
rustc_driver
rustc_error_codes
rustc_errors
rustc_expand Avoid cloning the contents of a TokenStream in a few places 2020-10-19 12:30:41 -04:00
rustc_feature Mark repr128 as incomplete_features 2020-10-21 23:41:26 +01:00
rustc_fs_util
rustc_graphviz
rustc_hir Calculate visibilities once in resolve 2020-10-19 11:57:50 +03:00
rustc_hir_pretty Do not print braces again print_anon_const already does it 2020-10-19 16:26:13 -03:00
rustc_incremental
rustc_index
rustc_infer Reduce diagram mess in 'match arms have incompatible types' error 2020-10-22 16:16:02 -07:00
rustc_interface
rustc_lexer
rustc_lint Rollup merge of #78155 - est31:rustc_lint_types_refactor, r=davidtwco 2020-10-22 09:45:38 +09:00
rustc_llvm
rustc_macros Lift: take self by value 2020-10-21 23:59:35 +02:00
rustc_metadata Calculate visibilities once in resolve 2020-10-19 11:57:50 +03:00
rustc_middle Rollup merge of #78255 - dtolnay:match, r=lcnr 2020-10-23 18:26:40 +09:00
rustc_mir Auto merge of #78212 - JohnTitor:rollup-j5r6xuy, r=JohnTitor 2020-10-22 01:35:05 +00:00
rustc_mir_build Rollup merge of #78098 - camelid:fixup-docs, r=steveklabnik 2020-10-23 18:26:28 +09:00
rustc_parse Make inline const work for half open ranges 2020-10-22 13:22:12 -03:00
rustc_parse_format
rustc_passes Auto merge of #77015 - davidtwco:check-attr-variant-closure-expr, r=lcnr 2020-10-23 17:32:04 +00:00
rustc_plugin_impl
rustc_privacy Calculate visibilities once in resolve 2020-10-19 11:57:50 +03:00
rustc_query_system Auto merge of #77871 - Julian-Wollersberger:less-query-context, r=oli-obk 2020-10-22 12:24:55 +00:00
rustc_resolve Auto merge of #78134 - bugadani:arena-nodrop, r=lcnr 2020-10-22 07:05:21 +00:00
rustc_save_analysis
rustc_serialize
rustc_session
rustc_span
rustc_symbol_mangling Update to rustc-demangle 0.1.18 2020-10-21 21:11:11 +01:00
rustc_target Rollup merge of #77716 - francesca64:revert-ios-dynamic-linking, r=jonas-schievink 2020-10-24 14:11:59 +02:00
rustc_trait_selection Normalize when finding trait object candidates 2020-10-22 08:18:29 +01:00
rustc_traits
rustc_ty Calculate visibilities once in resolve 2020-10-19 11:57:50 +03:00
rustc_typeck Rollup merge of #78255 - dtolnay:match, r=lcnr 2020-10-23 18:26:40 +09:00