[all-commits] [llvm/llvm-project] 1adcce: [Driver] Link ubsan_loop_detect with --whole-archi...

Vy Nguyen via All-commits all-commits at lists.llvm.org
Tue Sep 22 17:43:54 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1adcce186772332e969992d7792188befd615907
      https://github.com/llvm/llvm-project/commit/1adcce186772332e969992d7792188befd615907
  Author: Vy Nguyen <1762963+oontvoo at users.noreply.github.com>
  Date:   2026-09-22 (Tue, 22 Sep 2026)

  Changed paths:
    M clang/lib/Driver/ToolChains/CommonArgs.cpp
    M clang/test/Driver/sanitize-trap-loop.c

  Log Message:
  -----------
  [Driver] Link ubsan_loop_detect with --whole-archive (#225498)

`addSanitizerRuntimes` places sanitizer archives before user object
files on the linker command line.

Because `ubsan_loop_detect` was in `NonWholeStaticRuntimes` without `-u`
symbols, single-pass linkers like GNU `ld.bfd` discarded
`libclang_rt.ubsan_loop_detect.a` before seeing references to
`__ubsan_install_trap_loop_detection` or `__ubsan_is_trap_loop`. Move
`ubsan_loop_detect` to `StaticRuntimes` so it is linked with
`--whole-archive`.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list