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

Alexandre Ganea via All-commits all-commits at lists.llvm.org
Mon Mar 2 12:42:42 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7e77cf473ac9d8f8b65db017d660892f1c8f4b75
      https://github.com/llvm/llvm-project/commit/7e77cf473ac9d8f8b65db017d660892f1c8f4b75
  Author: Alexandre Ganea <alexandre.ganea at ubisoft.com>
  Date:   2020-03-02 (Mon, 02 Mar 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




More information about the All-commits mailing list