-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Project fails to link when using dylibs without the -Zshare-generics flag #67276
Copy link
Copy link
Closed
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Metadata
Metadata
Assignees
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I have opened this issue under the recommendation of @michaelwoerister who has been helping me track down the linking issues I have been having with dylibs.
As reported in previous issues which I piggybacked, the example provided will build on
1.36.0but nothing newer: https://github.com/AlexKornitzer/dylib-errors/tree/error/consulTo quote @michaelwoerister, the
-Zshare-genericsflag has potentially been identified as the root cause:Hence when building with
--releasethe linking issues go away.This is potentially related to #64319 and was originally being tracked in #64340.