[all-commits] [llvm/llvm-project] e4fce6: [Driver] Use .init_array for all gcc installations...

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Dec 13 14:10:52 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e4fce659a759ecdd59ceee750f1ff9b44f9de3f3
      https://github.com/llvm/llvm-project/commit/e4fce659a759ecdd59ceee750f1ff9b44f9de3f3
  Author: Fangrui Song <maskray at google.com>
  Date:   2019-12-13 (Fri, 13 Dec 2019)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Driver/ToolChains/FreeBSD.cpp
    M clang/lib/Driver/ToolChains/FreeBSD.h
    M clang/lib/Driver/ToolChains/Gnu.cpp
    M clang/test/Driver/constructors.c

  Log Message:
  -----------
  [Driver] Use .init_array for all gcc installations and simplify Generic_ELF -fno-use-init-array rules

D39317 made clang use .init_array when no gcc installations is found.
This change changes all gcc installations to use .init_array .

GCC 4.7 by default stopped providing .ctors/.dtors compatible crt files,
and stopped emitting .ctors for __attribute__((constructor)).
.init_array should always work.

FreeBSD rules are moved to FreeBSD.cpp to make Generic_ELF rules clean.

Reviewed By: rnk

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




More information about the All-commits mailing list