Skip to content

Commit 5b050d1

Browse files
committed
Test build for rust-lang/cc-rs#1176
1 parent 040bd38 commit 5b050d1

File tree

6 files changed

+166
-57
lines changed

6 files changed

+166
-57
lines changed

build/cargo-c.mk

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ PKG := cargo-c
22
$(PKG)_WEBSITE := https://github.com/lu-zero/cargo-c
33
$(PKG)_DESCR := cargo applet to build and install C-ABI compatibile libraries
44
$(PKG)_IGNORE :=
5-
$(PKG)_VERSION := 0.10.2
6-
$(PKG)_CHECKSUM := 0217c26fee99f3af867ce52719a39349d19ec6cfac084eea3901f8046f4607c6
5+
$(PKG)_VERSION := 0.10.3
6+
$(PKG)_CHECKSUM := 922171afb3ceaf6553ff3916ae4663d3743ba22f80725f2300a26b76eb6eb94f
77
$(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/$(PKG)-[0-9]*.patch)))
88
$(PKG)_GH_CONF := lu-zero/cargo-c/tags,v
99
$(PKG)_TARGETS := $(BUILD)

build/overrides.mk

+5-4
Original file line numberDiff line numberDiff line change
@@ -560,16 +560,17 @@ define librsvg_BUILD
560560
$(if $(IS_LLVM), \
561561
cd '$(BUILD_DIR)' && \
562562
MXE_ENABLE_NETWORK=1 \
563-
cargo vendor --manifest-path '$(SOURCE_DIR)/Cargo.toml' -s '$(PREFIX)/$(BUILD)/lib/rustlib/src/rust/library/sysroot/Cargo.toml')
563+
cargo vendor --manifest-path '$(SOURCE_DIR)/Cargo.toml' -s '$(PREFIX)/$(BUILD)/lib/rustlib/src/rust/library/Cargo.toml')
564564

565565
$(if $(IS_LLVM), \
566566
(cd '$(BUILD_DIR)' && $(PATCH) -p1 -u) < $(realpath $(dir $(lastword $(librsvg_PATCHES))))/librsvg-llvm-mingw.patch \
567567
# Update expected Cargo SHA256 hashes for the vendored files we have patched
568568
$(SED) -i 's/ddb4a16b289d368cc5c02080e67e2fd66091eed0b8478dfdb05006469494f6b0/42daa223b23e5df3f03e9da95e1e61411bfe507cba5a403bb6b8867892a95db0/' '$(BUILD_DIR)/vendor/cfg-expr/.cargo-checksum.json'; \
569-
$(SED) -i 's/666c050a52920a8eda20d9d2f2e645cb09660d5c17ce549c233a05c53ae6799b/525fa47360e61be4f017863ed397fd59ac23ac6e625175210efd2c96b7ae687c/' '$(BUILD_DIR)/vendor/compiler_builtins/.cargo-checksum.json'; \
570-
$(SED) -i 's/995997abcd5cb764c07fb27c9e2af82f1b713d8ae0577fc9e2d9fff9a5b997e8/4c6478a4de07f25c72d3b62dee381ef706df0c4de0d363e2029c415508e873bc/' '$(BUILD_DIR)/vendor/compiler_builtins/.cargo-checksum.json'; \
569+
$(SED) -i 's/d30364448703ab32cd2464745f9bbba314a7cee09c48f51027e532655b91b27b/58c03e8aea8836fabb019ede1e532e4839252e5194cc21abade4206786f986da/' '$(BUILD_DIR)/vendor/compiler_builtins/.cargo-checksum.json'; \
570+
$(SED) -i 's/a7be2be8ecb1feaafd2c22847d27f1a86d1090e771bd7097af831b1c94ba5bb4/ad4a2305fce53f883715d22d6f1f7b5f2175bc4790fcd541a4b7059d74781fc0/' '$(BUILD_DIR)/vendor/compiler_builtins/.cargo-checksum.json'; \
571571
$(SED) -i 's/204bc39a8213167dcab8dd273c57e5fae3afbac8fa3887dbe43ad082d55446e4/0e8c4e6440c5377f487918f16a8ea80aae53fa4d47e495a9e9c0119b575db0ab/' '$(BUILD_DIR)/vendor/windows-sys/.cargo-checksum.json'; \
572-
$(SED) -i 's/92440d3adb5cb6ea05596d9ca860a205d3937dbf0fc959e524bac5f2b748c1af/d7c8f937883854fa016e98e408faaccecb4c88ec95a0d2bdcc5791d871032723/' '$(BUILD_DIR)/vendor/cc-1.0.99/.cargo-checksum.json'; \
572+
$(SED) -i 's/92440d3adb5cb6ea05596d9ca860a205d3937dbf0fc959e524bac5f2b748c1af/553a632e29e3f5123891cbe73d67797093fb470822de027ad09bbe5e5a1e86b9/' '$(BUILD_DIR)/vendor/cc-1.0.99/.cargo-checksum.json'; \
573+
$(SED) -i 's/342be00f6215e161d8163e272a2945bb9f52f171648e15e11d46800a73186955/f939a570c99d897fdd37cd491a4ee0657e2c7480ec71acbd9cbee48732d4bfbc/' '$(BUILD_DIR)/vendor/cc-1.0.99/.cargo-checksum.json'; \
573574
# Install Cargo config
574575
$(INSTALL) -d '$(BUILD_DIR)/.cargo'
575576
(echo '[source.crates-io]'; \

build/patches/cargo-c-0.10-fixes.patch

+45-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
22
From: Kleis Auke Wolthuizen <github@kleisauke.nl>
33
Date: Sat, 2 Jan 2021 20:00:00 +0100
4-
Subject: [PATCH 1/1] Add llvm-mingw armv7 dlltool target
4+
Subject: [PATCH 1/2] Add llvm-mingw armv7 dlltool target
55

66
Upstream-Status: Inappropriate [enable feature]
77
armv7-pc-windows-gnullvm is not an officially supported Rust target.
@@ -18,3 +18,47 @@ index 1111111..2222222 100644
1818
_ => unimplemented!("Windows support for {} is not implemented yet.", arch),
1919
};
2020

21+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
22+
From: Kleis Auke Wolthuizen <github@kleisauke.nl>
23+
Date: Sat, 10 Aug 2024 11:43:45 +0200
24+
Subject: [PATCH 2/2] Bump cargo to rust-lang/cargo@50237f4
25+
26+
To fix the build with `-Zbuild-std`.
27+
28+
diff --git a/Cargo.toml b/Cargo.toml
29+
index 1111111..2222222 100644
30+
--- a/Cargo.toml
31+
+++ b/Cargo.toml
32+
@@ -28,8 +28,8 @@ name = "cargo-ctest"
33+
path = "src/bin/ctest.rs"
34+
35+
[dependencies]
36+
-cargo = "0.81.0"
37+
-cargo-util = "0.2"
38+
+cargo = { git = "https://github.com/rust-lang/cargo.git", rev = "50237f4" }
39+
+cargo-util = { git = "https://github.com/rust-lang/cargo.git", rev = "50237f4" }
40+
semver = "1.0.3"
41+
log = "0.4"
42+
clap = { version = "4.0.29", features = ["color", "derive", "cargo", "string"] }
43+
diff --git a/src/build.rs b/src/build.rs
44+
index 1111111..2222222 100644
45+
--- a/src/build.rs
46+
+++ b/src/build.rs
47+
@@ -1071,7 +1071,7 @@ pub fn cbuild(
48+
let only_staticlib = !libkinds.contains(&"cdylib");
49+
let only_cdylib = !libkinds.contains(&"staticlib");
50+
51+
- let profile = args.get_profile_name(config, default_profile, ProfileChecking::Custom)?;
52+
+ let profile = args.get_profile_name(default_profile, ProfileChecking::Custom)?;
53+
54+
let profiles = Profiles::new(ws, profile)?;
55+
56+
@@ -1258,7 +1258,7 @@ pub fn ctest(
57+
mut compile_opts: CompileOptions,
58+
) -> CliResult {
59+
compile_opts.build_config.requested_profile =
60+
- args.get_profile_name(config, "test", ProfileChecking::Custom)?;
61+
+ args.get_profile_name("test", ProfileChecking::Custom)?;
62+
compile_opts.build_config.mode = CompileMode::Test;
63+
64+
compile_opts.filter = ops::CompileFilter::new(

build/patches/librsvg-llvm-mingw.patch

+40-25
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ diff --git a/vendor/compiler_builtins/build.rs b/vendor/compiler_builtins/build.
4646
index 1111111..2222222 100644
4747
--- a/vendor/compiler_builtins/build.rs
4848
+++ b/vendor/compiler_builtins/build.rs
49-
@@ -421,7 +421,7 @@ mod c {
49+
@@ -502,7 +502,7 @@ mod c {
5050
}
5151
}
5252

53-
- if target_arch == "arm" && target_vendor != "apple" && target_env != "msvc" {
54-
+ if target_arch == "arm" && target_vendor != "apple" && target_os != "windows" {
53+
- if target.arch == "arm" && target.vendor != "apple" && target.env != "msvc" {
54+
+ if target.arch == "arm" && target.vendor != "apple" && target.os != "windows" {
5555
sources.extend(&[
5656
("__aeabi_div0", "arm/aeabi_div0.c"),
5757
("__aeabi_drsub", "arm/aeabi_drsub.c"),
@@ -247,38 +247,53 @@ index 1111111..2222222 100644
247247
*self
248248

249249
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
250-
From: Kleis Auke Wolthuizen <github@kleisauke.nl>
251-
Date: Mon, 29 Jul 2024 15:00:00 +0200
252-
Subject: [PATCH 5/5] Ensure compatibility with LLVM 19
250+
From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= <mati865@gmail.com>
251+
Date: Sat, 10 Aug 2024 12:21:00 +0200
252+
Subject: [PATCH 5/5] Remap Windows targets triples to their LLVM counterparts
253253

254-
See: https://github.com/rust-lang/cc-rs/issues/1167
254+
Fixes https://github.com/rust-lang/cc-rs/issues/1167
255255

256-
Upstream-Status: Pending
256+
Upstream-Status: Submitted [https://github.com/rust-lang/cc-rs/pull/1176]
257257

258258
diff --git a/vendor/cc-1.0.99/src/lib.rs b/vendor/cc-1.0.99/src/lib.rs
259259
index 1111111..2222222 100644
260260
--- a/vendor/cc-1.0.99/src/lib.rs
261261
+++ b/vendor/cc-1.0.99/src/lib.rs
262-
@@ -1889,7 +1889,10 @@ impl Build {
263-
cmd.push_opt_unless_duplicate(format!("-O{}", opt_level).into());
264-
}
265-
266-
- if cmd.is_like_clang() && target.contains("windows") {
267-
+ if cmd.is_like_clang()
268-
+ && target.contains("windows")
269-
+ && !target.ends_with("-gnullvm")
270-
+ {
271-
// Disambiguate mingw and msvc on Windows. Problem is that
272-
// depending on the origin clang can default to a mismatchig
273-
// run-time.
274-
@@ -2129,6 +2132,10 @@ impl Build {
262+
@@ -2129,6 +2129,17 @@ impl Build {
275263
}
276264

277265
cmd.push_cc_arg(format!("--target={}", target).into());
278-
+ } else if target.ends_with("-gnullvm") {
279-
+ cmd.push_cc_arg(
280-
+ format!("--target={}", target.strip_suffix("llvm").unwrap()).into(),
281-
+ );
266+
+ } else if let Ok(index) = target_info::WINDOWS_TRIPLE_MAPPING
267+
+ .binary_search_by_key(&target, |(target, _)| target)
268+
+ {
269+
+ cmd.args.push(
270+
+ format!(
271+
+ "--target={}-{}",
272+
+ target_info::WINDOWS_TRIPLE_MAPPING[index].1,
273+
+ rest
274+
+ )
275+
+ .into(),
276+
+ )
282277
} else {
283278
cmd.push_cc_arg(format!("--target={}", target).into());
284279
}
280+
diff --git a/vendor/cc-1.0.99/src/target_info.rs b/vendor/cc-1.0.99/src/target_info.rs
281+
index 1111111..2222222 100644
282+
--- a/vendor/cc-1.0.99/src/target_info.rs
283+
+++ b/vendor/cc-1.0.99/src/target_info.rs
284+
@@ -12,3 +12,15 @@ pub const RISCV_ARCH_MAPPING: &[(&str, &str)] = &[
285+
("riscv64gc", "riscv64"),
286+
("riscv64imac", "riscv64"),
287+
];
288+
+pub const WINDOWS_TRIPLE_MAPPING: &[(&str, &str)] = &[
289+
+ ("aarch64-pc-windows-gnullvm", "aarch64-pc-windows-gnu"),
290+
+ ("aarch64-uwp-windows-msvc", "aarch64-pc-windows-msvc"),
291+
+ ("i686-pc-windows-gnullvm", "i686-pc-windows-gnu"),
292+
+ ("i686-uwp-windows-gnu", "i686-pc-windows-gnu"),
293+
+ ("i686-uwp-windows-msvc", "i686-pc-windows-msvc"),
294+
+ ("i686-win7-windows-msvc", "i686-pc-windows-msvc"),
295+
+ ("thumbv7a-uwp-windows-msvc", "thumbv7a-pc-windows-msvc"),
296+
+ ("x86_64-pc-windows-gnullvm", "x86_64-pc-windows-gnu"),
297+
+ ("x86_64-uwp-windows-gnu", "x86_64-pc-windows-gnu"),
298+
+ ("x86_64-uwp-windows-msvc", "x86_64-pc-windows-msvc"),
299+
+];

build/plugins/llvm-mingw/patches/rust-1-fixes.patch

+67-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Contains ad hoc patches for cross building.
55
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
66
From: Kleis Auke Wolthuizen <github@kleisauke.nl>
77
Date: Tue, 15 Sep 2020 11:50:00 +0200
8-
Subject: [PATCH 1/4] Add `armv7-pc-windows-gnullvm` triple
8+
Subject: [PATCH 1/5] Add `armv7-pc-windows-gnullvm` triple
99

1010
Upstream-Status: Pending
1111

@@ -54,7 +54,7 @@ index 1111111..2222222 100644
5454
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
5555
From: Kleis Auke Wolthuizen <github@kleisauke.nl>
5656
Date: Tue, 22 Sep 2020 10:00:00 +0200
57-
Subject: [PATCH 2/4] std/unwind: Fix linker errors on `armv7-pc-windows-gnullvm`
57+
Subject: [PATCH 2/5] std/unwind: Fix linker errors on `armv7-pc-windows-gnullvm`
5858

5959
Details:
6060
ld.lld: error: undefined symbol: __gnu_unwind_frame
@@ -106,7 +106,7 @@ index 1111111..2222222 100644
106106
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
107107
From: Kleis Auke Wolthuizen <github@kleisauke.nl>
108108
Date: Tue, 30 Aug 2022 23:20:27 +0200
109-
Subject: [PATCH 3/4] windows-gnullvm: Avoid linking to libunwind statically
109+
Subject: [PATCH 3/5] windows-gnullvm: Avoid linking to libunwind statically
110110

111111
Avoid linking against the static variant of libunwind, which is not
112112
always available. Instead, prefer to use the unwind library from the
@@ -155,7 +155,7 @@ index 1111111..2222222 100644
155155
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
156156
From: Kleis Auke Wolthuizen <github@kleisauke.nl>
157157
Date: Mon, 17 Oct 2022 11:50:00 +0200
158-
Subject: [PATCH 4/4] Use GCC-style unwinding on MinGW targets other than i686
158+
Subject: [PATCH 4/5] Use GCC-style unwinding on MinGW targets other than i686
159159

160160
See: https://github.com/msys2/MINGW-packages/pull/13278
161161

@@ -200,3 +200,66 @@ index 1111111..2222222 100644
200200
// We declare these as opaque types. This is fine since you just need to
201201
// pass them to _GCC_specific_handler and forget about them.
202202
pub enum EXCEPTION_RECORD {}
203+
204+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
205+
From: Kleis Auke Wolthuizen <github@kleisauke.nl>
206+
Date: Tue, 16 Apr 2024 15:51:34 +0000
207+
Subject: [PATCH 5/5] std: revert use of `raw-dylib`
208+
209+
See: https://github.com/msys2/MINGW-packages/issues/21017
210+
211+
diff --git a/library/std/src/sys/pal/windows/c.rs b/library/std/src/sys/pal/windows/c.rs
212+
index 1111111..2222222 100644
213+
--- a/library/std/src/sys/pal/windows/c.rs
214+
+++ b/library/std/src/sys/pal/windows/c.rs
215+
@@ -112,7 +112,7 @@ pub struct MOUNT_POINT_REPARSE_BUFFER {
216+
217+
// Use raw-dylib to import ProcessPrng as we can't rely on there being an import library.
218+
cfg_if::cfg_if! {
219+
-if #[cfg(not(target_vendor = "win7"))] {
220+
+if #[cfg(any())] {
221+
#[cfg(target_arch = "x86")]
222+
#[link(name = "bcryptprimitives", kind = "raw-dylib", import_name_type = "undecorated")]
223+
extern "system" {
224+
@@ -157,19 +157,7 @@ pub fn GetTempPath2W(bufferlength: u32, buffer: PWSTR) -> u32 {
225+
}
226+
227+
#[cfg(not(target_vendor = "win7"))]
228+
-// Use raw-dylib to import synchronization functions to workaround issues with the older mingw import library.
229+
-#[cfg_attr(
230+
- target_arch = "x86",
231+
- link(
232+
- name = "api-ms-win-core-synch-l1-2-0",
233+
- kind = "raw-dylib",
234+
- import_name_type = "undecorated"
235+
- )
236+
-)]
237+
-#[cfg_attr(
238+
- not(target_arch = "x86"),
239+
- link(name = "api-ms-win-core-synch-l1-2-0", kind = "raw-dylib")
240+
-)]
241+
+#[link(name = "synchronization")]
242+
extern "system" {
243+
pub fn WaitOnAddress(
244+
address: *const c_void,
245+
diff --git a/library/std/src/sys/pal/windows/rand.rs b/library/std/src/sys/pal/windows/rand.rs
246+
index 1111111..2222222 100644
247+
--- a/library/std/src/sys/pal/windows/rand.rs
248+
+++ b/library/std/src/sys/pal/windows/rand.rs
249+
@@ -2,7 +2,7 @@
250+
251+
use crate::sys::c;
252+
253+
-#[cfg(not(target_vendor = "win7"))]
254+
+#[cfg(any())]
255+
#[inline]
256+
pub fn hashmap_random_keys() -> (u64, u64) {
257+
let mut v = (0, 0);
258+
@@ -13,7 +13,6 @@ pub fn hashmap_random_keys() -> (u64, u64) {
259+
v
260+
}
261+
262+
-#[cfg(target_vendor = "win7")]
263+
pub fn hashmap_random_keys() -> (u64, u64) {
264+
use crate::ffi::c_void;
265+
use crate::io;

build/plugins/llvm-mingw/rust.mk

+7-21
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ PKG := rust
22
$(PKG)_WEBSITE := https://www.rust-lang.org/
33
$(PKG)_DESCR := A systems programming language focused on safety, speed and concurrency.
44
$(PKG)_IGNORE :=
5-
# https://static.rust-lang.org/dist/2024-08-05/rustc-nightly-src.tar.xz.sha256
5+
# https://static.rust-lang.org/dist/2024-08-10/rustc-nightly-src.tar.xz.sha256
66
$(PKG)_VERSION := nightly
7-
$(PKG)_CHECKSUM := 49657b6ce056360c7d9e3b9e619761ddd2c7b41b98f18b34232e6da9d9f1fa55
7+
$(PKG)_CHECKSUM := 9ed5c76d3e6b324838af0151f4c97843f94a9f3620a60eb16cb1f9a67d0d2536
88
$(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/$(PKG)-[0-9]*.patch)))
99
$(PKG)_SUBDIR := $(PKG)c-$($(PKG)_VERSION)-src
1010
$(PKG)_FILE := $(PKG)c-$($(PKG)_VERSION)-src.tar.xz
11-
$(PKG)_URL := https://static.rust-lang.org/dist/2024-08-05/$($(PKG)_FILE)
11+
$(PKG)_URL := https://static.rust-lang.org/dist/2024-08-10/$($(PKG)_FILE)
1212
$(PKG)_DEPS := $(BUILD)~$(PKG)
1313
$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)
1414

@@ -32,20 +32,11 @@ define $(PKG)_BUILD_$(BUILD)
3232
$(eval unexport CXXFLAGS)
3333
$(eval unexport LDFLAGS)
3434

35-
# ld.lld: error: librsvg_c_api.a(bcryptprimitives.dll): .idata$4 should not refer to special section 0
36-
(cd '$(SOURCE_DIR)' && $(PATCH) -p1 -u) < \
37-
'$(SOURCE_DIR)/compiler/rustc_codegen_cranelift/patches/0029-stdlib-rawdylib-processprng.patch'
38-
39-
# libtool: error: object name conflicts in archive: .libs/librsvg-2.lax/librsvg_c_api.a//<<BUILDDIR>>/./.libs/librsvg_c_api.a
40-
(cd '$(SOURCE_DIR)' && $(PATCH) -p1 -u) < \
41-
'$(SOURCE_DIR)/compiler/rustc_codegen_cranelift/patches/0030-stdlib-Revert-use-raw-dylib-for-Windows-futex-APIs.patch'
42-
43-
# TODO(kleisauke): Build with --enable-vendor if we are no longer
44-
# patching panic_unwind/unwind.
4535
cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \
4636
--prefix='$(PREFIX)/$(BUILD)' \
4737
--sysconfdir='etc' \
4838
--release-channel=nightly \
39+
--enable-vendor \
4940
--enable-extended \
5041
--tools=cargo,src \
5142
--disable-docs \
@@ -72,11 +63,6 @@ define $(PKG)_BUILD_$(BUILD)
7263
cd '$(BUILD_DIR)' && \
7364
$(PYTHON3) $(SOURCE_DIR)/x.py install --stage 1 -j '$(JOBS)' -v
7465

75-
# Copy the Cargo.lock for Rust to places `vendor` will see
76-
# https://github.com/rust-lang/wg-cargo-std-aware/issues/23#issuecomment-720455524
77-
# https://github.com/rust-lang/cargo/pull/12088
78-
cp '$(PREFIX)/$(BUILD)/lib/rustlib/src/rust/Cargo.lock' '$(PREFIX)/$(BUILD)/lib/rustlib/src/rust/library/sysroot'
79-
8066
# `c` feature of the `compiler-builtins` crate needs the
8167
# compiler-rt sources from LLVM
8268
$(call PREPARE_PKG_SOURCE,llvm,$(BUILD_DIR))
@@ -89,7 +75,7 @@ define $(PKG)_BUILD
8975

9076
# Build and prepare startup objects like rsbegin.o and rsend.o
9177
$(foreach FILE, rsbegin rsend, \
92-
$(PREFIX)/$(BUILD)/bin/rustc -Ainternal_features --target='$(TARGET_RUST)' --emit=obj -o '$(BUILD_DIR)/$(FILE).o' \
78+
$(PREFIX)/$(BUILD)/bin/rustc --target='$(TARGET_RUST)' --emit=obj -o '$(BUILD_DIR)/$(FILE).o' \
9379
'$(PREFIX)/$(BUILD)/lib/rustlib/src/rust/library/rtstartup/$(FILE).rs';)
9480

9581
# Install the startup objects
@@ -107,7 +93,7 @@ define $(PKG)_BUILD
10793
echo 'CC_$(TARGET_RUST) = "$(TARGET)-clang"'; \
10894
echo 'RUST_COMPILER_RT_ROOT = "$(PREFIX)/$(BUILD)/lib/rustlib/src/rust/src/llvm-project/compiler-rt"'; \
10995
echo '[target.$(TARGET_RUST)]'; \
110-
echo 'linker = "$(TARGET)-clang"'; \
111-
echo 'ar = "$(PREFIX)/$(BUILD)/bin/llvm-ar"';) \
96+
echo 'ar = "$(PREFIX)/$(BUILD)/bin/llvm-ar"'; \
97+
echo 'linker = "$(TARGET)-clang"';) \
11298
> '$(PREFIX)/$(TARGET)/.cargo/config.toml'
11399
endef

0 commit comments

Comments
 (0)