[all-commits] [llvm/llvm-project] abae53: [Driver][test] Change some -fuse-ld=lld tests to b...

Fangrui Song via All-commits all-commits at lists.llvm.org
Sat Jul 29 19:34:28 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: abae53f43f0d1da8d8e421f4a628d7ec64d6e365
      https://github.com/llvm/llvm-project/commit/abae53f43f0d1da8d8e421f4a628d7ec64d6e365
  Author: Fangrui Song <i at maskray.me>
  Date:   2023-07-29 (Sat, 29 Jul 2023)

  Changed paths:
    A clang/test/Driver/Inputs/lld/ld.lld
    M clang/test/Driver/csky-toolchain.c
    M clang/test/Driver/fuchsia.c
    M clang/test/Driver/fuchsia.cpp
    M clang/test/Driver/hip-toolchain-no-rdc.hip
    M clang/test/Driver/hip-toolchain-rdc-separate.hip
    M clang/test/Driver/hip-toolchain-rdc-static-lib.hip
    M clang/test/Driver/hip-toolchain-rdc.hip
    M clang/test/Driver/mingw-lto.c
    M clang/test/Driver/ohos.c
    M clang/test/Driver/ohos.cpp
    M clang/test/Driver/opt-record.c
    M clang/test/Driver/riscv32-toolchain.c
    M clang/test/Driver/riscv64-toolchain.c

  Log Message:
  -----------
  [Driver][test] Change some -fuse-ld=lld tests to be agnostic of host ld.lld

If program paths (GCC installation, --sysroot, -B, etc) don't contain
ld.lld, whether -fuse-ld=lld succeeds depends on whether a PATH
directory contains ld.lld.

> error: invalid linker name in argument '-fuse-ld=lld'

This behavior is not suitable when we adopt the new strict behavior of
-### in D156363.

For some tests, append -B%S/Inputs/lld similar to D92028.
For others, use -fuse-ld=ld so that getDefaultLinker (instead of CLANG_DEFAULT_LINKER) is used. The complexity stems from CLANG_DEFAULT_LINKER.




More information about the All-commits mailing list