[PATCH] D24867: Request init/fini array on FreeBSD 12 and later
Dimitry Andric via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 29 12:22:59 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL336008: Request init/fini array on FreeBSD 12 and later (authored by dim, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D24867?vs=72282&id=153554#toc
Repository:
rL LLVM
https://reviews.llvm.org/D24867
Files:
cfe/trunk/lib/Driver/ToolChains/Gnu.cpp
cfe/trunk/test/Driver/constructors.c
Index: cfe/trunk/test/Driver/constructors.c
===================================================================
--- cfe/trunk/test/Driver/constructors.c
+++ cfe/trunk/test/Driver/constructors.c
@@ -80,6 +80,14 @@
// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
// RUN: -target arm64-none-none-eabi \
// RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s
+
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target i386-unknown-freebsd11 \
+// RUN: | FileCheck --check-prefix=CHECK-NO-INIT-ARRAY %s
+
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target i386-unknown-freebsd12 \
+// RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s
//
// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
// RUN: -target sparc-sun-solaris2.11 \
Index: cfe/trunk/lib/Driver/ToolChains/Gnu.cpp
===================================================================
--- cfe/trunk/lib/Driver/ToolChains/Gnu.cpp
+++ cfe/trunk/lib/Driver/ToolChains/Gnu.cpp
@@ -2543,6 +2543,8 @@
bool UseInitArrayDefault =
getTriple().getArch() == llvm::Triple::aarch64 ||
getTriple().getArch() == llvm::Triple::aarch64_be ||
+ (getTriple().getOS() == llvm::Triple::FreeBSD &&
+ getTriple().getOSMajorVersion() >= 12) ||
(getTriple().getOS() == llvm::Triple::Linux &&
((!GCCInstallation.isValid() || !V.isOlderThan(4, 7, 0)) ||
getTriple().isAndroid())) ||
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24867.153554.patch
Type: text/x-patch
Size: 1514 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180629/7df3dcb4/attachment.bin>
More information about the cfe-commits
mailing list