-
Notifications
You must be signed in to change notification settings - Fork 235
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
rust_protobuf_library up to custom_rule #28
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This will have to wait until custom_rule is available open source. The internal Windows build will fail with the current genrule based approach.
facebook-github-bot
added
the
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
label
Oct 19, 2022
ndmitchell
reviewed
Oct 19, 2022
The OUT_DIR variable depends on the value of $OUT so it cannot be set through the env attribute but needs to be evaluated by the shell.
ndmitchell
reviewed
Oct 19, 2022
@ndmitchell has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Closed
facebook-github-bot
pushed a commit
that referenced
this pull request
Oct 25, 2022
Summary: Depends on #28. Do not merge before #28. This uses #28 as its base branch. With this PR I can build cli:buck2 successfully on Ubuntu 22.04. I have tested the following commands successfully with the resulting binary: ``` buck2 --help buck2 uquery cli:buck2 ``` This addes * A few missing cargo dependencies for buck2. * Defines a cfg `buck_oss_build` to designate an open source build with buck2 itself. * Uses the above cfg to disable jemalloc. The corresponding Rust crate depends on jemalloc-sys, which includes a `build.rs` that runs an autotools build for jemalloc, which does not translate straightforwardly to a `cxx_library`. * Adds a fixup to build the `zstd-sys` C library. * Fixes the linking order with the vendored openssl library. * Adds `-lc` to the vendored `libcrypto`, which requires the `atexit` symbol from libc. Pull Request resolved: #31 Reviewed By: stepancheg Differential Revision: D40634228 Pulled By: ndmitchell fbshipit-source-id: 62bddd380b295f313af3ed975ff82bc13e84e5e5
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This defines an open source version of
rust_protobuf_library
rule up to the point where it requirescustom_rule
.The code has been tested on Linux to build
buck2_data
with agenrule
based replacement ofcustom_rule
that is commented out in this PR.Protoc and the protobuf standard library is fetched in a user defined rule from the protobuf release on Github.
This PR also unifies the required rule shims in
shim/shims.bzl
and defines re-exports to expose them under the appropriate labels.Relatedly it defines extra utilities to replace internal labels in
deps
,os_deps
, andbuild_env
attributes.