-
Notifications
You must be signed in to change notification settings - Fork 605
Add 'pending' commands (except the git ones) to toybox. #6597
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
Open
T045T
wants to merge
7
commits into
bazelbuild:main
Choose a base branch
from
T045T:toybox-add-pending-cmds
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+13,974
−3
Open
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
fd83bec
Add 'pending' commands (except the git ones) to toybox.
T045T d822cc7
Address review comments
T045T 284a058
make overlay/MODULE.bazel a symlink
T045T b6571ec
Fix presubmit errors
T045T e4f359a
address more review comments
T045T 7d01181
Update modules/toybox/0.8.12.bcr.1/overlay/BUILD
T045T 4d8ef2d
Update integrity values
T045T File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module( | ||
| name = "toybox", | ||
| version = "0.8.12.bcr.1", | ||
| bazel_compatibility = [">=7.2.1"], | ||
| ) | ||
| bazel_dep(name = "rules_cc", version = "0.1.1") | ||
| bazel_dep(name = "rules_license", version = "1.0.0") |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| load("@rules_cc//cc:defs.bzl", "cc_library") | ||
| load("@rules_license//rules:license.bzl", "license") | ||
|
|
||
| package( | ||
| default_applicable_licenses = [":license"], | ||
| default_visibility = ["//visibility:public"], | ||
| ) | ||
|
|
||
| license( | ||
| name = "license", | ||
| package_name = "toybox", | ||
| license_kinds = ["@rules_license//licenses/spdx:0BSD"], | ||
| license_text = "LICENSE", | ||
| package_url = "https://github.com/landley/toybox", | ||
| ) | ||
|
|
||
| COPTS = [ | ||
| "-funsigned-char", | ||
| "-w", | ||
| "-Wundef", | ||
| "-Wno-char-subscripts", | ||
| "-Os", | ||
| "-ffunction-sections", | ||
| "-fdata-sections", | ||
| "-fno-asynchronous-unwind-tables", | ||
| "-fvisibility=hidden", | ||
| ] | ||
|
|
||
| cc_library( | ||
| name = "generated_lib", | ||
| # Headers generated following: https://github.com/landley/toybox/blob/master/README | ||
| # make defconfig | ||
| # make | ||
| hdrs = glob([ | ||
| "generated/*.h", | ||
| ]), | ||
| includes = ["."], | ||
| visibility = ["//visibility:private"], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "helper_lib", | ||
| srcs = glob([ | ||
| "lib/*.c", | ||
| ]), | ||
| hdrs = [ | ||
| "lib/lsm.h", | ||
| "lib/toyflags.h", | ||
| "toys.h", | ||
| ], | ||
| copts = COPTS, | ||
| features = [ | ||
| "-parse_headers", | ||
| ], | ||
| textual_hdrs = [ | ||
| "lib/lib.h", | ||
| "lib/portability.h", | ||
| ], | ||
| visibility = ["//visibility:private"], | ||
| deps = [":generated_lib"], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "toys_lib", | ||
| srcs = glob( | ||
| include = [ | ||
| "toys/lsb/*.c", | ||
| "toys/net/*.c", | ||
| "toys/other/*.c", | ||
| "toys/pending/*.c", | ||
| "toys/posix/*.c", | ||
| ], | ||
| exclude = [ | ||
| "toys/lsb/passwd.c", | ||
| "toys/other/chcon.c", | ||
| "toys/pending/git*.c", # toybox git relies on openssl | ||
| ], | ||
| ), | ||
| copts = COPTS, | ||
| linkopts = ["-lresolv"], | ||
| textual_hdrs = [ | ||
| "toys.h", | ||
| ], | ||
| visibility = ["//visibility:private"], | ||
| deps = [ | ||
| ":generated_lib", | ||
| ":helper_lib", | ||
| ], | ||
| ) | ||
|
|
||
| cc_binary( | ||
| name = "toybox", | ||
| srcs = ["main.c"], | ||
| copts = COPTS, | ||
| features = [ | ||
| "fully_static_link", | ||
| "static_pie", | ||
| ], | ||
| linkopts = [ | ||
| "-s", | ||
| "-Wl,--no-export-dynamic", | ||
| "-Wl,--gc-sections", | ||
| "-Wl,--as-needed", | ||
| "-lcrypt", | ||
| "-lutil", | ||
| "-lm", | ||
| ], | ||
| deps = [ | ||
| ":toys_lib", | ||
| ], | ||
| ) | ||
T045T marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module( | ||
| name = "toybox", | ||
| version = "0.8.12.bcr.1", | ||
| bazel_compatibility = [">=7.2.1"], | ||
| ) | ||
| bazel_dep(name = "rules_cc", version = "0.1.1") | ||
| bazel_dep(name = "rules_license", version = "1.0.0") |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.