Skip to content

Commit ad7f604

Browse files
committed
[SOL] Adjust compiler after upgrade to 1.75.0
1 parent df535d9 commit ad7f604

File tree

18 files changed

+73
-40
lines changed

18 files changed

+73
-40
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ jobs:
208208
- name: disable git crlf conversion
209209
run: git config --global core.autocrlf false
210210
- name: checkout the source code
211-
uses: actions/checkout@v3
211+
uses: actions/checkout@v4
212212
with:
213213
fetch-depth: 0
214214
- name: configure the PR in which the error message will be posted
@@ -230,6 +230,9 @@ jobs:
230230
- name: show the current environment
231231
run: src/ci/scripts/dump-environment.sh
232232
if: success() && !env.SKIP_JOB
233+
- name: install awscli
234+
run: src/ci/scripts/install-awscli.sh
235+
if: success() && !env.SKIP_JOB
233236
- name: install sccache
234237
run: src/ci/scripts/install-sccache.sh
235238
if: success() && !env.SKIP_JOB
@@ -239,6 +242,9 @@ jobs:
239242
- name: install clang
240243
run: src/ci/scripts/install-clang.sh
241244
if: success() && !env.SKIP_JOB
245+
- name: install tidy
246+
run: src/ci/scripts/install-tidy.sh
247+
if: success() && !env.SKIP_JOB
242248
- name: install WIX
243249
run: src/ci/scripts/install-wix.sh
244250
if: success() && !env.SKIP_JOB
@@ -431,7 +437,7 @@ jobs:
431437
- name: x86_64-gnu-llvm-17
432438
env:
433439
RUST_BACKTRACE: 1
434-
os: ubuntu-20.04-8core-32gb
440+
os: ubuntu-latest
435441
- name: x86_64-gnu-llvm-16
436442
env:
437443
RUST_BACKTRACE: 1

Cargo.lock

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -723,8 +723,7 @@ checksum = "55b672471b4e9f9e95499ea597ff64941a309b2cdbffcc46f2cc5e2d971fd335"
723723
[[package]]
724724
name = "compiler_builtins"
725725
version = "0.1.103"
726-
source = "registry+https://github.com/rust-lang/crates.io-index"
727-
checksum = "a3b73c3443a5fd2438d7ba4853c64e4c8efc2404a9e28a9234cc2d5eebc6c242"
726+
source = "git+https://github.com/solana-labs/compiler-builtins?tag=solana-tools-v1.40#81ef46f3fe1357095acdd089a700890fe4e13974"
728727
dependencies = [
729728
"cc",
730729
"rustc-std-workspace-core",
@@ -781,8 +780,8 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
781780
name = "core"
782781
version = "0.0.0"
783782
dependencies = [
784-
"getrandom 0.1.14",
785-
"rand 0.7.3",
783+
"getrandom 0.1.16",
784+
"rand",
786785
"rand_xorshift",
787786
]
788787

@@ -1592,6 +1591,17 @@ dependencies = [
15921591
"unicode-width",
15931592
]
15941593

1594+
[[package]]
1595+
name = "getrandom"
1596+
version = "0.1.16"
1597+
source = "registry+https://github.com/rust-lang/crates.io-index"
1598+
checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
1599+
dependencies = [
1600+
"cfg-if",
1601+
"libc",
1602+
"wasi 0.9.0+wasi-snapshot-preview1",
1603+
]
1604+
15951605
[[package]]
15961606
name = "getrandom"
15971607
version = "0.2.10"
@@ -1600,7 +1610,7 @@ checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
16001610
dependencies = [
16011611
"cfg-if",
16021612
"libc",
1603-
"wasi",
1613+
"wasi 0.11.0+wasi-snapshot-preview1",
16041614
]
16051615

16061616
[[package]]
@@ -2524,7 +2534,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
25242534
checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2"
25252535
dependencies = [
25262536
"libc",
2527-
"wasi",
2537+
"wasi 0.11.0+wasi-snapshot-preview1",
25282538
"windows-sys 0.48.0",
25292539
]
25302540

@@ -2545,7 +2555,7 @@ dependencies = [
25452555
"colored",
25462556
"ctrlc",
25472557
"env_logger 0.10.0",
2548-
"getrandom",
2558+
"getrandom 0.2.10",
25492559
"lazy_static",
25502560
"libc",
25512561
"libffi",
@@ -3176,7 +3186,7 @@ version = "0.6.4"
31763186
source = "registry+https://github.com/rust-lang/crates.io-index"
31773187
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
31783188
dependencies = [
3179-
"getrandom",
3189+
"getrandom 0.2.10",
31803190
]
31813191

31823192
[[package]]
@@ -3241,7 +3251,7 @@ version = "0.4.3"
32413251
source = "registry+https://github.com/rust-lang/crates.io-index"
32423252
checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
32433253
dependencies = [
3244-
"getrandom",
3254+
"getrandom 0.2.10",
32453255
"redox_syscall 0.2.16",
32463256
"thiserror",
32473257
]
@@ -5138,7 +5148,7 @@ dependencies = [
51385148
"rustc-demangle",
51395149
"std_detect",
51405150
"unwind",
5141-
"wasi",
5151+
"wasi 0.11.0+wasi-snapshot-preview1",
51425152
]
51435153

51445154
[[package]]
@@ -5964,7 +5974,7 @@ version = "1.4.0"
59645974
source = "registry+https://github.com/rust-lang/crates.io-index"
59655975
checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be"
59665976
dependencies = [
5967-
"getrandom",
5977+
"getrandom 0.2.10",
59685978
]
59695979

59705980
[[package]]
@@ -6004,6 +6014,12 @@ dependencies = [
60046014
"try-lock",
60056015
]
60066016

6017+
[[package]]
6018+
name = "wasi"
6019+
version = "0.9.0+wasi-snapshot-preview1"
6020+
source = "registry+https://github.com/rust-lang/crates.io-index"
6021+
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
6022+
60076023
[[package]]
60086024
name = "wasi"
60096025
version = "0.11.0+wasi-snapshot-preview1"
@@ -6439,8 +6455,3 @@ dependencies = [
64396455
"crossbeam-utils",
64406456
"flate2",
64416457
]
6442-
6443-
[[patch.unused]]
6444-
name = "compiler_builtins"
6445-
version = "0.1.76"
6446-
source = "git+https://github.com/solana-labs/compiler-builtins#2044d7e16a99d951853ce362e384027dec4c5b92"

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ miniz_oxide.debug = 0
105105
object.debug = 0
106106

107107
[patch.crates-io]
108-
compiler_builtins = { git = "https://github.com/solana-labs/compiler-builtins" }
108+
compiler_builtins = { git = "https://github.com/solana-labs/compiler-builtins", tag = "solana-tools-v1.40" }
109109
# See comments in `library/rustc-std-workspace-core/README.md` for what's going on
110110
# here
111111
rustc-std-workspace-core = { path = 'library/rustc-std-workspace-core' }

compiler/rustc_codegen_gcc/src/intrinsic/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
1414
use rustc_codegen_ssa::mir::place::PlaceRef;
1515
use rustc_codegen_ssa::traits::{ArgAbiMethods, BuilderMethods, ConstMethods, IntrinsicCallMethods};
1616
#[cfg(feature="master")]
17-
use rustc_codegen_ssa::traits::{BaseTypeMethods, MiscMethods};
17+
use rustc_codegen_ssa::traits::MiscMethods;
18+
use rustc_codegen_ssa::traits::BaseTypeMethods;
1819
use rustc_codegen_ssa::errors::InvalidMonomorphization;
1920
use rustc_middle::bug;
2021
use rustc_middle::ty::{self, Instance, Ty};

compiler/rustc_codegen_ssa/src/base.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,6 @@ pub fn maybe_create_entry_wrapper<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
422422
) -> Bx::Function {
423423
// The entry function is either `int main(void)` or `int main(int argc, char **argv)`, or
424424
// `usize efi_main(void *handle, void *system_table)` depending on the target.
425-
let is_bpf = cx.sess().target.arch == "bpf" && cx.sess().opts.test;
426425
let llfty = if cx.sess().target.os.contains("uefi") {
427426
cx.type_func(&[cx.type_ptr(), cx.type_ptr()], cx.type_isize())
428427
} else if cx.sess().target.main_needs_argc_argv {
@@ -487,7 +486,7 @@ pub fn maybe_create_entry_wrapper<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
487486
(rust_main, start_ty, vec![arg_argc, arg_argv])
488487
};
489488

490-
let result = bx.call(start_ty, None, start_fn, &args, None);
489+
let result = bx.call(start_ty, None, None, start_fn, &args, None);
491490
if cx.sess().target.os.contains("uefi") {
492491
bx.ret(result);
493492
} else {

compiler/rustc_target/src/spec/base/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub(crate) mod netbsd;
2222
pub(crate) mod nto_qnx;
2323
pub(crate) mod openbsd;
2424
pub(crate) mod redox;
25+
pub(crate) mod sbf_base;
2526
pub(crate) mod solaris;
2627
pub(crate) mod solid;
2728
pub(crate) mod teeos;

compiler/rustc_target/src/spec/sbf_base.rs renamed to compiler/rustc_target/src/spec/base/sbf_base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::abi::Endian;
2-
use super::{Cc, cvs, LinkerFlavor, Lld, PanicStrategy, TargetOptions};
2+
use crate::spec::{Cc, cvs, LinkerFlavor, Lld, PanicStrategy, TargetOptions};
33

44
pub fn opts() -> TargetOptions {
55
let linker_script = r"

compiler/rustc_target/src/spec/bpfel_unknown_unknown.rs renamed to compiler/rustc_target/src/spec/targets/bpfel_unknown_unknown.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::spec::Target;
2-
use crate::spec::sbf_base;
2+
use crate::spec::base::sbf_base;
33

44
pub fn target() -> Target {
55
Target {

compiler/rustc_target/src/spec/sbf_solana_solana.rs renamed to compiler/rustc_target/src/spec/targets/sbf_solana_solana.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::spec::Target;
2-
use crate::spec::sbf_base;
2+
use crate::spec::base::sbf_base;
33

44
pub fn target() -> Target {
55
Target {

library/alloc/src/alloc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ pub mod __alloc_error_handler {
430430
pub unsafe fn __rdl_oom(size: usize, _align: usize) -> ! {
431431
core::panicking::panic_nounwind_fmt(format_args!(
432432
"memory allocation of {size} bytes failed"
433-
))
433+
), /* force_no_backtrace */ false)
434434
}
435435
}
436436

0 commit comments

Comments
 (0)