From 63a2fb214385ad146d2a79a69771f0f5cc115ba8 Mon Sep 17 00:00:00 2001 From: Luni-4 Date: Fri, 4 Mar 2022 10:36:10 +0100 Subject: [PATCH 1/2] Use Rust stripped binaries option With the new Rust 1.59 version, it is possible to strip standard library debug symbols directly from Cargo --- Cargo.toml | 1 + enums/Cargo.toml | 3 +++ rust-code-analysis-cli/Cargo.toml | 3 +++ rust-code-analysis-web/Cargo.toml | 3 +++ 4 files changed, 10 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 2888c2296..864372b63 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,3 +55,4 @@ codegen-units = 1 panic = "unwind" incremental = false overflow-checks = false +strip = "debuginfo" diff --git a/enums/Cargo.toml b/enums/Cargo.toml index a0dff2e72..d1aace38e 100644 --- a/enums/Cargo.toml +++ b/enums/Cargo.toml @@ -18,3 +18,6 @@ tree-sitter-preproc = { path = "../tree-sitter-preproc", version = "=0.19.0" } tree-sitter-ccomment = { path = "../tree-sitter-ccomment", version = "=0.19.0" } tree-sitter-mozcpp = { path = "../tree-sitter-mozcpp", version = "=0.20.1" } tree-sitter-mozjs = { path = "../tree-sitter-mozjs", version = "=0.19.0" } + +[profile.release] +strip = "debuginfo" diff --git a/rust-code-analysis-cli/Cargo.toml b/rust-code-analysis-cli/Cargo.toml index f463e19e0..7dce805de 100644 --- a/rust-code-analysis-cli/Cargo.toml +++ b/rust-code-analysis-cli/Cargo.toml @@ -22,3 +22,6 @@ serde_cbor = "^0.11" serde_json = "^1.0" serde_yaml = "^0.8" toml = "^0.5" + +[profile.release] +strip = "debuginfo" diff --git a/rust-code-analysis-web/Cargo.toml b/rust-code-analysis-web/Cargo.toml index 77fc5147c..2ca53a12b 100644 --- a/rust-code-analysis-web/Cargo.toml +++ b/rust-code-analysis-web/Cargo.toml @@ -23,3 +23,6 @@ serde_json = "^1.0" [dev-dependencies] pretty_assertions = "^1.0" + +[profile.release] +strip = "debuginfo" From caaa0b700ce1982de5c6e7755162835a3e48b2dd Mon Sep 17 00:00:00 2001 From: Luni-4 Date: Fri, 4 Mar 2022 11:06:34 +0100 Subject: [PATCH 2/2] Update cargo udeps This update is necessary to support the new Rust strip option --- .taskcluster.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.taskcluster.yml b/.taskcluster.yml index 1b46d0d1e..897e73c1e 100644 --- a/.taskcluster.yml +++ b/.taskcluster.yml @@ -42,7 +42,7 @@ tasks: - "curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py && rustup component add clippy rustfmt && rustup toolchain install nightly && - curl -L https://github.com/est31/cargo-udeps/releases/download/v0.1.25/cargo-udeps-v0.1.25-x86_64-unknown-linux-gnu.tar.gz | tar xz -C /usr/local/cargo/bin --strip-components 2 && + curl -L https://github.com/est31/cargo-udeps/releases/download/v0.1.27/cargo-udeps-v0.1.27-x86_64-unknown-linux-gnu.tar.gz | tar xz -C /usr/local/cargo/bin --strip-components 2 && curl -L https://github.com/rustsec/rustsec/releases/download/cargo-audit%2Fv0.16.0/cargo-audit-x86_64-unknown-linux-musl-v0.16.0.tgz | tar xzv -C /usr/local/cargo/bin --strip-components 1 && git clone --quiet ${repository} && cd rust-code-analysis &&