mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-10-16 00:33:22 +08:00
[fix] disable Rust symbol stripping for Slint on macOS
This commit is contained in:
Vendored
+8
-1
@@ -73,12 +73,19 @@ package("slint")
|
||||
end
|
||||
envs.CARGO_ENCODED_RUSTFLAGS = (rustflags ~= "" and rustflags .. "\31" or "") ..
|
||||
"-Ctarget-feature=+crt-static"
|
||||
elseif package:is_plat("macosx") then
|
||||
-- Rust 1.92's implicit debuginfo stripping can misalign Mach-O
|
||||
-- LINKEDIT string pools, which macOS 27 rejects (rust-lang/rust#157750).
|
||||
-- Set both profiles explicitly, including their build dependencies.
|
||||
envs = cmake.buildenvs(package)
|
||||
envs.CARGO_PROFILE_RELEASE_STRIP = "none"
|
||||
envs.CARGO_PROFILE_DEV_STRIP = "none"
|
||||
end
|
||||
cmake.install(package, configs, {envs = envs})
|
||||
end)
|
||||
|
||||
on_test(function(package)
|
||||
assert(package:has_cxxincludes("slint.h", {configs = {languages = "c++20"}}), "Slint C++ headers are unusable")
|
||||
assert(package:has_cxxincludes("slint.h", {configs = {languages = "c++20"}}), "Slint C++ compile/link check failed")
|
||||
assert(os.isfile(path.join(package:installdir(), "bin", is_host("windows") and "slint-compiler.exe" or "slint-compiler")), "slint-compiler was not installed")
|
||||
end)
|
||||
package_end()
|
||||
|
||||
Reference in New Issue
Block a user