Skip to content

Instantly share code, notes, and snippets.

@marvin-hansen
Created April 25, 2024 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marvin-hansen/99a1977d4dfe54dd8f8f16e876b767c0 to your computer and use it in GitHub Desktop.
Save marvin-hansen/99a1977d4dfe54dd8f8f16e876b767c0 to your computer and use it in GitHub Desktop.
rust_binary(
name = "bin",
crate_root = "src/main.rs",
srcs = glob([
"src/**/*.rs",
]),
aliases = aliases(),
proc_macro_deps = all_crate_deps(proc_macro = True),
rustc_flags = select({
"//:release": [
"-Clto",
"-Ccodegen-units=1",
"-Cpanic=abort",
"-Copt-level=3",
"-Cstrip=symbols",
],
"//conditions:default":
[
"-Copt-level=0",
],
}),
deps = all_crate_deps(
normal = True,
) + [
"//my_target:common",
],
tags = ["manual"],
visibility = ["//visibility:public"],
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment