-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Allow #[link(kind = "dylib")] without a name #131966
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
Conversation
This comment has been minimized.
This comment has been minimized.
b480b82 to
701594c
Compare
|
@bors try |
Allow #[link(kind = "dylib")] without a name This PR allows `#[link(kind = "dylib")]` without a library name (see the [dllimport RFC](https://rust-lang.github.io/rfcs/1717-dllimport.html) for how this affects `extern {}` blocks). This will need a lang fcp but I wanted to investigate how feasible this is. I want a bare `kind` to act the same as any other `#[link]` for the purposes of applying (or not) dllimport so it gets added to the same array. However, this then means they need to be filtered out from normal queries. To facilitate this I've added a wrapper type for the `NativeLib` container and a separate query for `is_dllimport`. try-job: x86_64-msvc try-job: x86_64-mingw
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
💔 Test failed - checks-actions |
701594c to
a1ec55a
Compare
|
@bors try |
Allow #[link(kind = "dylib")] without a name This PR allows `#[link(kind = "dylib")]` without a library name (see the [dllimport RFC](https://rust-lang.github.io/rfcs/1717-dllimport.html) for how this affects `extern {}` blocks). This will need a lang fcp but I wanted to investigate how feasible this is. I want a bare `kind` to act the same as any other `#[link]` for the purposes of applying (or not) dllimport so it gets added to the same array. However, this then means they need to be filtered out from normal queries. To facilitate this I've added a wrapper type for the `NativeLib` container and a separate query for `is_dllimport`. try-job: x86_64-msvc try-job: x86_64-mingw
|
☀️ Try build successful - checks-actions |
a1ec55a to
a1b2f15
Compare
|
Does this need a compiler review yet? |
|
Lang haven't yet considered this. |
|
I'll close this. While this approach can work, I'd prefer to do it a different way. This is ultimately an ABI concern rather than anything to do with native libs per se. Well I guess it can be thought of as referencing an |
This PR allows
#[link(kind = "dylib")]without a library name (see the dllimport RFC for how this affectsextern {}blocks).This will need a lang fcp but I wanted to investigate how feasible this is. I want a bare
kindto act the same as any other#[link]for the purposes of applying (or not) dllimport so the kind gets added to the sameNativeLibarray. However, this then means they need to be filtered out from normal queries. To facilitate this I've added a wrapper type for theNativeLibcontainer and a separate query foris_dllimport.try-job: x86_64-msvc
try-job: x86_64-mingw