diff --git a/.cargo/config.toml b/.cargo/config.toml index 2150461d6e..d392db9f43 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -9,6 +9,5 @@ TABLEGEN_190_PREFIX = "/usr/lib/llvm-19/" # https://nnethercote.github.io/perf-book/build-configuration.html#linking. # TODO: remove this once `rust` stabilizes `lld` as the default linker, currently only on nightly: # https://github.com/rust-lang/rust/issues/39915#issuecomment-618726211 -[target.x86_64-unknown-linux-gnu] -[target.stable-x86_64-unknown-linux-gnu] +[target.'cfg(all(target_os = "linux"))'] rustflags = ["-Clink-arg=-fuse-ld=lld"] diff --git a/.github/workflows/blockifier_ci.yml b/.github/workflows/blockifier_ci.yml index f4de270b92..cffde84f5f 100644 --- a/.github/workflows/blockifier_ci.yml +++ b/.github/workflows/blockifier_ci.yml @@ -35,7 +35,7 @@ on: - 'scripts/sequencer-ci.Dockerfile' env: - RUSTFLAGS: "-D warnings" + RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" # On PR events, cancel existing CI runs on this same PR for this workflow. concurrency: diff --git a/.github/workflows/blockifier_compiled_cairo.yml b/.github/workflows/blockifier_compiled_cairo.yml index f3df06a83d..d8f6e010ec 100644 --- a/.github/workflows/blockifier_compiled_cairo.yml +++ b/.github/workflows/blockifier_compiled_cairo.yml @@ -16,7 +16,7 @@ on: - 'scripts/dependencies.sh' env: - RUSTFLAGS: "-D warnings" + RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" # On PR events, cancel existing CI runs on this same PR for this workflow. concurrency: diff --git a/.github/workflows/blockifier_reexecution_ci.yml b/.github/workflows/blockifier_reexecution_ci.yml index ebdd1eb9c1..91f6a13344 100644 --- a/.github/workflows/blockifier_reexecution_ci.yml +++ b/.github/workflows/blockifier_reexecution_ci.yml @@ -20,7 +20,7 @@ on: - 'scripts/sequencer-ci.Dockerfile' env: - RUSTFLAGS: "-D warnings" + RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" # On PR events, cancel existing CI runs on this same PR for this workflow. concurrency: diff --git a/.github/workflows/committer_ci.yml b/.github/workflows/committer_ci.yml index c284523ed1..2b7c1f620f 100644 --- a/.github/workflows/committer_ci.yml +++ b/.github/workflows/committer_ci.yml @@ -19,7 +19,7 @@ on: - 'scripts/dependencies.sh' env: - RUSTFLAGS: "-D warnings" + RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" # On PR events, cancel existing CI runs on this same PR for this workflow. concurrency: diff --git a/.github/workflows/committer_cli_push.yml b/.github/workflows/committer_cli_push.yml index 5690590674..1d14b57553 100644 --- a/.github/workflows/committer_cli_push.yml +++ b/.github/workflows/committer_cli_push.yml @@ -35,7 +35,7 @@ on: - 'scripts/dependencies.sh' env: - RUSTFLAGS: "-D warnings" + RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" # On PR events, cancel existing CI runs on this same PR for this workflow. concurrency: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 24f25b1b74..b878a01408 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ on: env: CI: 1 - RUSTFLAGS: "-D warnings" + RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" # On PR events, cancel existing CI runs on this same PR for this workflow. concurrency: diff --git a/.github/workflows/main_pr.yml b/.github/workflows/main_pr.yml index 93540b13e6..5d99b3831b 100644 --- a/.github/workflows/main_pr.yml +++ b/.github/workflows/main_pr.yml @@ -10,7 +10,7 @@ on: - edited env: - RUSTFLAGS: "-D warnings" + RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" # On PR events, cancel existing CI runs on this same PR for this workflow. concurrency: diff --git a/.github/workflows/papyrus_ci.yml b/.github/workflows/papyrus_ci.yml index cf8f68ede8..894661e4b2 100644 --- a/.github/workflows/papyrus_ci.yml +++ b/.github/workflows/papyrus_ci.yml @@ -23,7 +23,7 @@ on: types: [checks_requested] env: - RUSTFLAGS: "-D warnings" + RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" # On PR events, cancel existing CI runs on this same PR for this workflow. concurrency: diff --git a/.github/workflows/papyrus_docker-publish.yml b/.github/workflows/papyrus_docker-publish.yml index 4b1f01fb85..7815c7da72 100644 --- a/.github/workflows/papyrus_docker-publish.yml +++ b/.github/workflows/papyrus_docker-publish.yml @@ -28,7 +28,7 @@ concurrency: env: REGISTRY: ghcr.io REPO_NAME: ${{ github.repository }} - RUSTFLAGS: "-D warnings" + RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" jobs: docker-build-push: diff --git a/.github/workflows/papyrus_nightly-tests-call.yml b/.github/workflows/papyrus_nightly-tests-call.yml index dc5896a66e..6171e514e6 100644 --- a/.github/workflows/papyrus_nightly-tests-call.yml +++ b/.github/workflows/papyrus_nightly-tests-call.yml @@ -17,7 +17,7 @@ on: required: true env: - RUSTFLAGS: "-D warnings" + RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" jobs: GW-integration-test-call: diff --git a/.github/workflows/papyrus_nightly-tests.yml b/.github/workflows/papyrus_nightly-tests.yml index 1f913a92b8..802760c292 100644 --- a/.github/workflows/papyrus_nightly-tests.yml +++ b/.github/workflows/papyrus_nightly-tests.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: # Uses ubuntu runner. env: - RUSTFLAGS: "-D warnings" + RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" jobs: GW-integration-test-ubuntu: diff --git a/.github/workflows/sequencer_integration_tests.yml b/.github/workflows/sequencer_integration_tests.yml index 06225562a5..685bd47f14 100644 --- a/.github/workflows/sequencer_integration_tests.yml +++ b/.github/workflows/sequencer_integration_tests.yml @@ -11,7 +11,7 @@ on: env: SEQUENCER_INTEGRATION_TESTS: 1 - RUSTFLAGS: "-D warnings" + RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" # On PR events, cancel existing CI runs on this same PR for this workflow. concurrency: diff --git a/.github/workflows/upload_artifacts_workflow.yml b/.github/workflows/upload_artifacts_workflow.yml index 570d924383..bf7261435a 100644 --- a/.github/workflows/upload_artifacts_workflow.yml +++ b/.github/workflows/upload_artifacts_workflow.yml @@ -6,7 +6,7 @@ on: types: [completed] env: - RUSTFLAGS: "-D warnings" + RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" jobs: native-blockifier-artifacts-push: diff --git a/.github/workflows/verify-deps.yml b/.github/workflows/verify-deps.yml index 58c2897f8c..eb11c7cfaa 100644 --- a/.github/workflows/verify-deps.yml +++ b/.github/workflows/verify-deps.yml @@ -5,7 +5,7 @@ on: - cron: '0 0 * * *' # Runs at 00:00 UTC every day env: - RUSTFLAGS: "-D warnings" + RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" jobs: latest_deps: