[all-commits] [llvm/llvm-project] d8e986: [Driver] Gnu: Move -s/-t/-u emission to match GCC ...

Fangrui Song via All-commits all-commits at lists.llvm.org
Sun Apr 19 19:22:47 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d8e9862e71b6bb7f5b8c06159429f31a1516299c
      https://github.com/llvm/llvm-project/commit/d8e9862e71b6bb7f5b8c06159429f31a1516299c
  Author: Fangrui Song <i at maskray.me>
  Date:   2026-04-20 (Mon, 20 Apr 2026)

  Changed paths:
    M clang/lib/Driver/ToolChains/Gnu.cpp
    M clang/test/Driver/linux-ld-args.c

  Log Message:
  -----------
  [Driver] Gnu: Move -s/-t/-u emission to match GCC order (#192883)

GCC places -s, -t, and -u sym in one contiguous group just before
Scrt1.o / crt1.o, with -L paths after the CRT files.

Match that ordering by dropping the early `push_back("-s")` and rolling
-s, -t, and -u into one addAllArgs call placed immediately after -o
output. This keeps -Wl,... after -s/-t/-u so that user overrides like
-Wl,--strip-debug still take precedence. Update linux-ld-args.c to

-T remains at the end so earlier -L paths take precedence.



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