Skip to content

Commit 0dd9b8f

Browse files
committed
add fix for full tools and sanitizer
1 parent 34d898a commit 0dd9b8f

File tree

5 files changed

+44
-38
lines changed

5 files changed

+44
-38
lines changed

Cargo.lock

Lines changed: 19 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,22 +1997,22 @@ dependencies = [
19971997
]
19981998

19991999
[[package]]
2000-
name = "libffi"
2001-
version = "3.2.0"
2000+
name = "libffi-sys2"
2001+
version = "2.4.0"
20022002
source = "registry+https://github.com/rust-lang/crates.io-index"
2003-
checksum = "ce826c243048e3d5cec441799724de52e2d42f820468431fc3fceee2341871e2"
2003+
checksum = "47aedd9774ffb3dcab5c96f593cb5a0caf421a5e38b16bab3b8cdef5facb6ea2"
20042004
dependencies = [
2005-
"libc",
2006-
"libffi-sys",
2005+
"cc",
20072006
]
20082007

20092008
[[package]]
2010-
name = "libffi-sys"
2011-
version = "2.3.0"
2009+
name = "libffi2"
2010+
version = "3.3.0"
20122011
source = "registry+https://github.com/rust-lang/crates.io-index"
2013-
checksum = "f36115160c57e8529781b4183c2bb51fdc1f6d6d1ed345591d84be7703befb3c"
2012+
checksum = "c88a3402cad8ff58216ec6d07e5ecfa9e15fc36613c0a832db541e4e1a718a7b"
20142013
dependencies = [
2015-
"cc",
2014+
"libc",
2015+
"libffi-sys2",
20162016
]
20172017

20182018
[[package]]
@@ -2164,20 +2164,6 @@ dependencies = [
21642164
"digest",
21652165
]
21662166

2167-
[[package]]
2168-
name = "measureme"
2169-
version = "11.0.1"
2170-
source = "registry+https://github.com/rust-lang/crates.io-index"
2171-
checksum = "dfa4a40f09af7aa6faef38285402a78847d0d72bf8827006cd2a332e1e6e4a8d"
2172-
dependencies = [
2173-
"log",
2174-
"memmap2",
2175-
"parking_lot",
2176-
"perf-event-open-sys",
2177-
"rustc-hash 1.1.0",
2178-
"smallvec",
2179-
]
2180-
21812167
[[package]]
21822168
name = "measureme"
21832169
version = "12.0.1"
@@ -2273,15 +2259,15 @@ dependencies = [
22732259
"directories",
22742260
"getrandom 0.3.1",
22752261
"libc",
2276-
"libffi",
2262+
"libffi2",
22772263
"libloading",
2278-
"measureme 11.0.1",
2264+
"measureme",
22792265
"rand 0.9.0",
22802266
"regex",
22812267
"rustc_version",
22822268
"smallvec",
22832269
"tempfile",
2284-
"tikv-jemalloc-sys",
2270+
"tikv-jemalloc-sys2",
22852271
"ui_test 0.28.0",
22862272
"windows-sys 0.52.0",
22872273
]
@@ -3109,7 +3095,7 @@ dependencies = [
31093095
"rustc_driver_impl",
31103096
"rustc_smir",
31113097
"stable_mir",
3112-
"tikv-jemalloc-sys",
3098+
"tikv-jemalloc-sys2",
31133099
]
31143100

31153101
[[package]]
@@ -3379,7 +3365,7 @@ dependencies = [
33793365
"gimli 0.30.0",
33803366
"itertools",
33813367
"libc",
3382-
"measureme 12.0.1",
3368+
"measureme",
33833369
"object 0.36.7",
33843370
"rustc-demangle",
33853371
"rustc_abi",
@@ -3497,7 +3483,7 @@ dependencies = [
34973483
"indexmap",
34983484
"jobserver",
34993485
"libc",
3500-
"measureme 12.0.1",
3486+
"measureme",
35013487
"memmap2",
35023488
"parking_lot",
35033489
"portable-atomic",
@@ -4262,7 +4248,7 @@ dependencies = [
42624248
name = "rustc_query_impl"
42634249
version = "0.0.0"
42644250
dependencies = [
4265-
"measureme 12.0.1",
4251+
"measureme",
42664252
"rustc_data_structures",
42674253
"rustc_errors",
42684254
"rustc_hashes",
@@ -5278,10 +5264,10 @@ name = "tier-check"
52785264
version = "0.1.0"
52795265

52805266
[[package]]
5281-
name = "tikv-jemalloc-sys"
5282-
version = "0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7"
5267+
name = "tikv-jemalloc-sys2"
5268+
version = "0.6.2+5.3.0-1-g298687593109d2a574b4d6db33025f935fd5e974"
52835269
source = "registry+https://github.com/rust-lang/crates.io-index"
5284-
checksum = "cd3c60906412afa9c2b5b5a48ca6a5abe5736aec9eb48ad05037a677e52e4e2d"
5270+
checksum = "9f2527dc9cad3897a96975c4821ec077ebf35ad465d5875fb48ae9dcc8cde93b"
52855271
dependencies = [
52865272
"cc",
52875273
"libc",

compiler/rustc/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ rustc_smir = { path = "../rustc_smir" }
2020
stable_mir = { path = "../stable_mir" }
2121
# tidy-alphabetical-end
2222

23+
# tikv-jemalloc-sys2-0.6.2 is a fork of tikv-jemalloc-sys-0.6.1 with OpenHarmony (OHOS) support.
2324
[dependencies.tikv-jemalloc-sys]
24-
version = "0.6.0"
25+
version = "0.6.2"
26+
package = "tikv-jemalloc-sys2"
2527
optional = true
2628
features = ['unprefixed_malloc_on_supported_platforms']
2729

src/bootstrap/src/core/build_steps/llvm.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,10 @@ fn configure_cmake(
814814
cflags.push(s);
815815
}
816816

817+
if target.contains("ohos") {
818+
cflags.push(" -D_LINUX_SYSINFO_H");
819+
}
820+
817821
if builder.config.llvm_clang_cl.is_some() {
818822
cflags.push(format!(" --target={target}"));
819823
}
@@ -834,6 +838,11 @@ fn configure_cmake(
834838
cxxflags.push(" ");
835839
cxxflags.push(s);
836840
}
841+
842+
if target.contains("ohos") {
843+
cxxflags.push(" -D_LINUX_SYSINFO_H");
844+
}
845+
837846
if builder.config.llvm_clang_cl.is_some() {
838847
cxxflags.push(format!(" --target={target}"));
839848
}
@@ -1220,6 +1229,10 @@ impl Step for Sanitizers {
12201229
cfg.define("COMPILER_RT_USE_LIBCXX", "OFF");
12211230
cfg.define("LLVM_CONFIG_PATH", &llvm_config);
12221231

1232+
if self.target.contains("ohos") {
1233+
cfg.define("COMPILER_RT_USE_BUILTINS_LIBRARY", "ON");
1234+
}
1235+
12231236
// On Darwin targets the sanitizer runtimes are build as universal binaries.
12241237
// Unfortunately sccache currently lacks support to build them successfully.
12251238
// Disable compiler launcher on Darwin targets to avoid potential issues.

src/ci/docker/host-x86_64/dist-ohos/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ ENV \
6060

6161
ENV RUST_CONFIGURE_ARGS \
6262
--enable-profiler \
63-
--disable-docs
63+
--disable-docs \
64+
--enable-full-tools \
65+
--enable-extended \
66+
--enable-sanitizers
6467

6568
ENV SCRIPT python3 ../x.py dist --host=$TARGETS --target $TARGETS
6669

src/tools/miri/Cargo.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ getrandom = { version = "0.3", features = ["std"] }
2222
rand = "0.9"
2323
smallvec = { version = "1.7", features = ["drain_filter"] }
2424
aes = { version = "0.8.3", features = ["hazmat"] }
25-
measureme = "11"
25+
measureme = "12.0.1"
2626
chrono = { version = "0.4.38", default-features = false }
2727
chrono-tz = "0.10"
2828
directories = "5"
@@ -31,12 +31,14 @@ directories = "5"
3131
# But only for some targets, it fails for others. Rustc configures this in its CI, but we can't
3232
# easily use that since we support of-tree builds.
3333
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies.tikv-jemalloc-sys]
34-
version = "0.6.0"
34+
version = "0.6.2"
35+
package = "tikv-jemalloc-sys2"
3536
features = ['unprefixed_malloc_on_supported_platforms']
3637

38+
# libffi2-3.3.0 is a fork of libffi-3.2.0 with OpenHarmony (OHOS) support.
3739
[target.'cfg(unix)'.dependencies]
3840
libc = "0.2"
39-
libffi = "3.2.0"
41+
libffi = { version = "3.3.0", package = "libffi2" }
4042
libloading = "0.8"
4143

4244
[target.'cfg(target_family = "windows")'.dependencies]

0 commit comments

Comments
 (0)