-
Notifications
You must be signed in to change notification settings - Fork 81
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
Support static linking of Haskell libraries in CC binaries #838
Labels
Comments
This was referenced Apr 23, 2019
mboes
added a commit
that referenced
this issue
May 4, 2019
Exposing GHC's global package database to Bazel enables us to stop treating prebuilt libraries specially. They now export a `HaskellLibraryInfo` like any other library. Even better, they now also export a `CcInfo` provider like any other native code library, which means that CC rules have a full view of all static archives needed for linking a binary statically (see the `cc_haskell_import` test, which no longer requires `linkstatic = False`). `HaskellPrebuiltPackageInfo` is still there but now has no content. It's only there to prevent aspects from reaching too far. We'll get rid of it in future commits. Fixes #838
mboes
added a commit
that referenced
this issue
May 4, 2019
Exposing GHC's global package database to Bazel enables us to stop treating prebuilt libraries specially. They now export a `HaskellLibraryInfo` like any other library. Even better, they now also export a `CcInfo` provider like any other native code library, which means that CC rules have a full view of all static archives needed for linking a binary statically (see the `cc_haskell_import` test, which no longer requires `linkstatic = False`). `HaskellPrebuiltPackageInfo` is still there but now has no content. It's only there to prevent aspects from reaching too far. We'll get rid of it in future commits. Fixes #838
mboes
added a commit
that referenced
this issue
May 4, 2019
Exposing GHC's global package database to Bazel enables us to stop treating prebuilt libraries specially. They now export a `HaskellLibraryInfo` like any other library. Even better, they now also export a `CcInfo` provider like any other native code library, which means that CC rules have a full view of all static archives needed for linking a binary statically (see the `cc_haskell_import` test, which no longer requires `linkstatic = False`). `HaskellPrebuiltPackageInfo` is still there but now has no content. It's only there to prevent aspects from reaching too far. We'll get rid of it in future commits. Fixes #838
mboes
added a commit
that referenced
this issue
May 6, 2019
Exposing GHC's global package database to Bazel enables us to stop treating prebuilt libraries specially. They now export a `HaskellLibraryInfo` like any other library. Even better, they now also export a `CcInfo` provider like any other native code library, which means that CC rules have a full view of all static archives needed for linking a binary statically (see the `cc_haskell_import` test, which no longer requires `linkstatic = False`). `HaskellPrebuiltPackageInfo` is still there but now has no content. It's only there to prevent aspects from reaching too far. We'll get rid of it in future commits. Fixes #838
mboes
added a commit
that referenced
this issue
May 6, 2019
Exposing GHC's global package database to Bazel enables us to stop treating prebuilt libraries specially. They now export a `HaskellLibraryInfo` like any other library. Even better, they now also export a `CcInfo` provider like any other native code library, which means that CC rules have a full view of all static archives needed for linking a binary statically (see the `cc_haskell_import` test, which no longer requires `linkstatic = False`). `HaskellPrebuiltPackageInfo` is still there but now has no content. It's only there to prevent aspects from reaching too far. We'll get rid of it in future commits. Fixes #838
mboes
added a commit
that referenced
this issue
May 6, 2019
Exposing GHC's global package database to Bazel enables us to stop treating prebuilt libraries specially. They now export a `HaskellLibraryInfo` like any other library. Even better, they now also export a `CcInfo` provider like any other native code library, which means that CC rules have a full view of all static archives needed for linking a binary statically (see the `cc_haskell_import` test, which no longer requires `linkstatic = False`). `HaskellPrebuiltPackageInfo` is still there but now has no content. It's only there to prevent aspects from reaching too far. We'll get rid of it in future commits. Fixes #838
mboes
added a commit
that referenced
this issue
May 6, 2019
Exposing GHC's global package database to Bazel enables us to stop treating prebuilt libraries specially. They now export a `HaskellLibraryInfo` like any other library. Even better, they now also export a `CcInfo` provider like any other native code library, which means that CC rules have a full view of all static archives needed for linking a binary statically (see the `cc_haskell_import` test, which no longer requires `linkstatic = False`). `HaskellPrebuiltPackageInfo` is still there but now has no content. It's only there to prevent aspects from reaching too far. We'll get rid of it in future commits. Fixes #838
mboes
added a commit
that referenced
this issue
May 6, 2019
Exposing GHC's global package database to Bazel enables us to stop treating prebuilt libraries specially. They now export a `HaskellLibraryInfo` like any other library. Even better, they now also export a `CcInfo` provider like any other native code library, which means that CC rules have a full view of all static archives needed for linking a binary statically (see the `cc_haskell_import` test, which no longer requires `linkstatic = False`). `HaskellPrebuiltPackageInfo` is still there but now has no content. It's only there to prevent aspects from reaching too far. We'll get rid of it in future commits. Fixes #838
aherrmann
pushed a commit
that referenced
this issue
May 13, 2019
Exposing GHC's global package database to Bazel enables us to stop treating prebuilt libraries specially. They now export a `HaskellLibraryInfo` like any other library. Even better, they now also export a `CcInfo` provider like any other native code library, which means that CC rules have a full view of all static archives needed for linking a binary statically (see the `cc_haskell_import` test, which no longer requires `linkstatic = False`). `HaskellPrebuiltPackageInfo` is still there but now has no content. It's only there to prevent aspects from reaching too far. We'll get rid of it in future commits. Fixes #838
aherrmann
pushed a commit
that referenced
this issue
May 13, 2019
Exposing GHC's global package database to Bazel enables us to stop treating prebuilt libraries specially. They now export a `HaskellLibraryInfo` like any other library. Even better, they now also export a `CcInfo` provider like any other native code library, which means that CC rules have a full view of all static archives needed for linking a binary statically (see the `cc_haskell_import` test, which no longer requires `linkstatic = False`). `HaskellPrebuiltPackageInfo` is still there but now has no content. It's only there to prevent aspects from reaching too far. We'll get rid of it in future commits. Fixes #838
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
CC binaries can either be "mostly static" or "dynamic". To get the latter we need to set
linkstatic = False
. Without this attribute, CC binaries that depend on Haskell binaries fail with a link error, because prebuilt libraries do not advertise to the CC rules where to find their respective static library file.Describe the solution you'd like
Linking against Haskell binaries should be supported even with
linkstatic = False
incc_binary
, just like it is already supported inhaskell_binary
. For this to be possible, all Haskell libraries (including the RTS) should return aCcInfo
provider.The text was updated successfully, but these errors were encountered: