Skip to content

[android][build.ps1] use the newly built lld when linking swift runti… #76706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions utils/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,13 @@ function Build-CMakeProject {
# Add additional linker flags for generating the debug info.
Append-FlagsDefine $Defines CMAKE_SHARED_LINKER_FLAGS "/debug"
Append-FlagsDefine $Defines CMAKE_EXE_LINKER_FLAGS "/debug"
} elseif ($Platform -eq "Android") {
# Use a built lld linker as the Android's NDK linker might be too
# old and not support all required relocations needed by the Swift
# runtime.
$ldPath = ([IO.Path]::Combine($CompilersBinaryCache, "bin", "ld.lld"))
Append-FlagsDefine $Defines CMAKE_SHARED_LINKER_FLAGS "--ld-path=$ldPath"
Append-FlagsDefine $Defines CMAKE_EXE_LINKER_FLAGS "--ld-path=$ldPath"
}
}

Expand Down