Skip to content
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

[watchos] Dynamic linking is not allowed for watchos targets #104361

Merged
merged 1 commit into from
Nov 17, 2022

Conversation

vladimir-ea
Copy link
Contributor

Dynamic linking of all apple targets was (re-) enabled in PR #100636. However, dynamic linking is not allowed on WatchOS so this broke the build of standard library for WatchOS.

This change disables dynamic linking for WatchOS non-simulator targets.

@rustbot
Copy link
Collaborator

rustbot commented Nov 13, 2022

r? @oli-obk

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 13, 2022
@rustbot
Copy link
Collaborator

rustbot commented Nov 13, 2022

These commits modify compiler targets.
(See the Target Tier Policy.)

@vladimir-ea
Copy link
Contributor Author

Fix for: #103508 @thomcc

@rust-log-analyzer

This comment has been minimized.

@oli-obk
Copy link
Contributor

oli-obk commented Nov 14, 2022

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 14, 2022

📌 Commit db99a89 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 14, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 14, 2022
…=oli-obk

[watchos] Dynamic linking is not allowed for watchos targets

Dynamic linking of all apple targets was (re-) enabled in PR rust-lang#100636. However, dynamic linking is not allowed on WatchOS so this broke the build of standard library for WatchOS.

This change disables dynamic linking for WatchOS non-simulator targets.
@matthiaskrgr
Copy link
Member

@bors rollup=iffy
might have failed in this rollup: #104399

@vladimir-ea
Copy link
Contributor Author

@bors rollup=iffy might have failed in this rollup: #104399

I cannot see what has failed - could you provide a link? Thanks

@vladimir-ea
Copy link
Contributor Author

@bors rollup=iffy might have failed in this rollup: #104399

I cannot see what has failed - could you provide a link? Thanks

Actually I do see, there was a build failure:

/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/librust_dep.rlib:lib.rmeta: no symbols
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-arch" "x86_64" "-m64" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/rustciK3U9l/symbols.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/main.main.cbcd4161-cgu.0.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/main.main.cbcd4161-cgu.1.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/main.main.cbcd4161-cgu.2.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/main.main.cbcd4161-cgu.3.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/main.main.cbcd4161-cgu.4.rcgu.o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/main.4g86d6gt786od2ny.rcgu.o" "-L" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2" "-L" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/librust_dep.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/rustciK3U9l/native_dep.ext" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libstd-b706291094b027ef.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-26793481f52a6183.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libobject-255e039944a74112.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libmemchr-1b5390a4c4ea9670.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-7ff5ded3cc87cac1.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libgimli-3bc94adda00ae909.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-3b1acde86cef02df.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libstd_detect-475d6817bf154f91.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-3f74afb4c8b5ee8d.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libminiz_oxide-f41ecafa3ea6ace0.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libadler-3f9d4598433d8696.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-f17787f13d366dbc.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libunwind-844b6239e11df154.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-31edd1de4ccf8e64.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/liblibc-626e8a15f1ab42d5.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/liballoc-1a1a8a9181840fa7.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-7763b67623a38e07.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libcore-3775c6f0a76e9fa6.rlib" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-357b73ae6c57f814.rlib" "-lSystem" "-lc" "-lm" "-L" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/main" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: in /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/librust_dep.rlib(native_dep.ext), archive member 'native_dep.ext' with length 8015824 is not mach-o or llvm bitcode file '/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/run-make/rlib-format-packed-bundled-libs-2/rlib-format-packed-bundled-libs-2/librust_dep.rlib'
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: aborting due to previous error

This PR did change some target options related to linking but WatchOS targets - I don't think it can be the cause of the problem seen here?

@vladimir-ea
Copy link
Contributor Author

@matthiaskrgr I can't see how changes to WatchOS target specs could have caused that build error. Is it significant that the last item in the rollup is marked as failed?
Screenshot 2022-11-15 at 22 06 35

@oli-obk
Copy link
Contributor

oli-obk commented Nov 15, 2022

@bors r+ rollup=never

Let's land this outside a rollup. I also don't think this PR should cause failures like that

@bors
Copy link
Contributor

bors commented Nov 15, 2022

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Contributor

bors commented Nov 15, 2022

📌 Commit db99a89 has been approved by oli-obk

It is now in the queue for this repository.

@Manishearth
Copy link
Member

@bors p=1

going to close the tree for non-nevers for a while so they can drain out

@Manishearth
Copy link
Member

Manishearth commented Nov 16, 2022

@bors treeclosed=1

So that the rollup=nevers can drain through for a while. Feel free to prioritize PRs above this but please avoid making rollups for a while

@bors
Copy link
Contributor

bors commented Nov 17, 2022

⌛ Testing commit db99a89 with merge 83356b7...

@bors
Copy link
Contributor

bors commented Nov 17, 2022

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 83356b7 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 17, 2022
@bors bors merged commit 83356b7 into rust-lang:master Nov 17, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 17, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (83356b7): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.3% [-1.3%, -1.3%] 2
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.7% [2.7%, 2.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
…li-obk

[watchos] Dynamic linking is not allowed for watchos targets

Dynamic linking of all apple targets was (re-) enabled in PR rust-lang#100636. However, dynamic linking is not allowed on WatchOS so this broke the build of standard library for WatchOS.

This change disables dynamic linking for WatchOS non-simulator targets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants