Skip to content

[build-script] Skip libLTO in sanitizer presets (#91274) - #91400

Open
duow310 wants to merge 1 commit into
release/6.4.xfrom
dwang/cherry-pick-91274
Open

[build-script] Skip libLTO in sanitizer presets (#91274)#91400
duow310 wants to merge 1 commit into
release/6.4.xfrom
dwang/cherry-pick-91274

Conversation

@duow310

@duow310 duow310 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor
  • Explanation:
    On macOS, ld dlopens libLTO.dylib eagerly at startup to probe LTO capabilities. When the swift-built libLTO is sanitized, dyld pulls the sanitizer runtime into ld's process, and AMFI's sanitizer-load platform policy on recent macOS versions rejects it, aborting the link. Skip building libLTO in the sanitizer presets so ld falls back to Xcode's unsanitized copy; these presets don't exercise LTO codegen.
  • Scope:
    This only affects the ASAN CI jobs.
  • Issues:
    Build failure in the new ASAN CI job being brought up.
  • Original PRs:
    [build-script] Skip libLTO in sanitizer presets #91274
  • Risk:
    Low. The ASAN preset does not exercise LTO so we lose little to no test coverage.
  • Testing:
    Tested in the new ASAN CI job being brought up.
  • Reviewers:
    @ndrewh

On macOS, ld dlopens libLTO.dylib eagerly at startup to probe LTO
capabilities. When the swift-built libLTO is sanitized, dyld pulls the
sanitizer runtime into ld's process, and AMFI's sanitizer-load platform
policy on recent macOS versions rejects it, aborting the link. Skip
building libLTO in the sanitizer presets so ld falls back to Xcode's
unsanitized copy; these presets don't exercise LTO codegen.

(cherry picked from commit f3bea01)
Signed-off-by: Duo Wang <duo_wang@apple.com>
@duow310
duow310 requested a review from a team as a code owner August 11, 2026 19:48
@duow310

duow310 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@swift-ci smoke test

@shahmishal

Copy link
Copy Markdown
Member

@swift-ci test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants