[all-commits] [llvm/llvm-project] 9cf9cf: [Clang] Fix Hurd toolchain test on a two-stage bui...

Alexandre Ganea via All-commits all-commits at lists.llvm.org
Wed Apr 29 15:25:28 PDT 2020


  Branch: refs/heads/release/10.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 9cf9cf2a398ce70d9187afa59db6500e7a1f2cd0
      https://github.com/llvm/llvm-project/commit/9cf9cf2a398ce70d9187afa59db6500e7a1f2cd0
  Author: Alexandre Ganea <alexandre.ganea at ubisoft.com>
  Date:   2020-04-29 (Wed, 29 Apr 2020)

  Changed paths:
    M clang/lib/Driver/ToolChains/Gnu.cpp
    M clang/lib/Driver/ToolChains/Gnu.h
    M clang/lib/Driver/ToolChains/Hurd.cpp
    M clang/lib/Driver/ToolChains/Hurd.h
    M clang/lib/Driver/ToolChains/Linux.cpp
    M clang/lib/Driver/ToolChains/Linux.h

  Log Message:
  -----------
  [Clang] Fix Hurd toolchain test on a two-stage build with ThinLTO

A two-stage ThinLTO build previously failed the clang/test/Driver/hurd.c test because of a static_cast in "tools::gnutools::Linker::ConstructJob()" which wrongly converted an instance of "clang::driver::toolchains::Hurd" into that of "clang::driver::toolchains::Linux". ThinLTO would later devirtualize the "ToolChain.getDynamicLinker(Args)" call and use "Linux::getDynamicLinker()" instead, causing the test to generate a wrong "-dynamic-linker" linker flag (/lib/ld-linux.so.2 instead of /lib/ld.so)

Fixes PR45061.

Differential Revision: https://reviews.llvm.org/D75373

(cherry picked from commit 7e77cf473ac9d8f8b65db017d660892f1c8f4b75)




More information about the All-commits mailing list