Skip to content
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

Bazel: stub internal repo parts needed for building rust binaries #17387

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion misc/bazel/rust.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def codeql_rust_binary(
visibility = None,
symbols_test = True,
**kwargs):
rust_label_name = name + "_single_arch"
rust_label_name = "single_arch/" + name
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Copy link
Contributor Author

@redsun82 redsun82 Sep 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(mind that this is not just stylistic, by stubbing universal_binary with an alias this was required to preserve the base name)

universal_binary(
name = name,
dep = ":" + rust_label_name,
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This check only makes sense when building from the internal repository

def glibc_symbols_check(**kwargs):
pass
5 changes: 5 additions & 0 deletions misc/bazel/semmle_code_stub/buildutils-internal/lipo.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# we only need to build universal binaries when building releases from the internal repo
# when building from the codeql repo, we can stub this rule with an alias

def universal_binary(*, name, dep, **kwargs):
native.alias(name = name, actual = dep, **kwargs)
Loading