You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if LTO is enabled on MacOS (and possibly other operating systems). Then Rust Analyzer will SIGABRT.
Using rustflags = ["-C", "linker-plugin-lto", "-C", "link-arg=-fuse-ld=lld"] is problematic while rustflags = ["-C", "link-arg=-fuse-ld=lld"] is fine.
See example repo. If I turn off LTO via config.toml then there is no issue.
This is my linker script which is not in the repo.
#!/bin/sh
# wrapper to adapt ld64 to gnu style arguments
declare -a args=()
for arg in "$@"
do
if [[ $arg == "-Wl,"* ]]; then
IFS=',' read -r -a options <<< "${arg#-Wl,}"
for option in "${options[@]}"
do
if [[ $option == "-plugin="* ]] || [[ $option == "-plugin-opt=mcpu="* ]]; then
:
elif [[ $option == "-plugin-opt=O"* ]]; then
args[${#args[@]}]="-Wl,--lto-CGO${option#-plugin-opt=O}"
else
args[${#args[@]}]="-Wl,$option"
fi
done
else
args[${#args[@]}]="$arg"
fi
done
exec ${CXX:-/opt/homebrew/opt/llvm/bin/clang++} "${args[@]}"
The text was updated successfully, but these errors were encountered:
See example demonstrating the issue: https://github.com/dave-fl/ra_ex_project
if LTO is enabled on MacOS (and possibly other operating systems). Then Rust Analyzer will SIGABRT.
Using
rustflags = ["-C", "linker-plugin-lto", "-C", "link-arg=-fuse-ld=lld"]
is problematic whilerustflags = ["-C", "link-arg=-fuse-ld=lld"]
is fine.See example repo. If I turn off LTO via config.toml then there is no issue.
This is my linker script which is not in the repo.
The text was updated successfully, but these errors were encountered: