Browse Source

cargo-rustc-static-lib: rename "main" function in staticlib

Since we build a staticlib, we don't need a main() function and it can
be confusing. The goal is to extract the dependencies that we'll use
when building the other plugins.
work/unnecessary-disc-string
Alexandre Janniaux 1 year ago
committed by Felix Paul Kühne
parent
commit
c363a7d86b
  1. 2
      buildsystem/cargo-rustc-static-libs.py

2
buildsystem/cargo-rustc-static-libs.py

@ -61,7 +61,7 @@ path = "lib.rs"
""") """)
with open("lib.rs", "w", encoding="utf-8") as lib_rs: with open("lib.rs", "w", encoding="utf-8") as lib_rs:
lib_rs.write("#![allow(dead_code)] fn main(){}") lib_rs.write("#![allow(dead_code)] fn foo(){}")
# Execute the cargo build and redirect stdout/stderr # Execute the cargo build and redirect stdout/stderr
cargo_r = subprocess.run(cargo_argv, stdout=subprocess.PIPE, stderr=subprocess.PIPE) cargo_r = subprocess.run(cargo_argv, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

Loading…
Cancel
Save