llvm-project/clang/lib/Driver/ToolChains
Fangrui Song 2632ebb551 [Driver] Render target options (e.g. -fuse-init-array) for -fembed-bitcode
Modern ELF platforms use -fuse-init-array to emit .init_array instead of
.ctors .  ld.bfd and gold --ctors-in-init-array merge .init_array and
.ctors into .init_array but lld doesn't do that.

If crtbegin*.o crtend*.o don't provide .ctors/.dtors, such .ctors in
user object files can lead to crash (see PR42002. The first and the last
elements in .ctors/.dtors are ignored - they are traditionally provided
by crtbegin*.o crtend*.o).

Call addClangTargetOptions() to ensure -fuse-init-array is rendered on
modern ELF platforms. On Hexagon, this renders -target-feature
+reserved-r19 for -ffixed-r19.

Reviewed By: compnerd

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

llvm-svn: 362052
2019-05-30 02:30:04 +00:00
..
Arch [PowerPC] Set the default PLT mode on musl to Secure PLT 2019-05-30 02:13:15 +00:00
AMDGPU.cpp AMDGPU: Don't emit debugger subtarget features 2019-02-21 21:31:43 +00:00
AMDGPU.h [AMDGPU] Switch default DWARF version to 5 2019-03-29 17:45:40 +00:00
AVR.cpp [AVR] Automatically link CRT and libgcc from the system avr-gcc 2019-05-19 09:54:14 +00:00
AVR.h [AVR] Automatically link CRT and libgcc from the system avr-gcc 2019-05-19 09:54:14 +00:00
Ananas.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Ananas.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BareMetal.cpp Fix file headers. NFC 2019-03-01 06:49:51 +00:00
BareMetal.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Clang.cpp [Driver] Render target options (e.g. -fuse-init-array) for -fembed-bitcode 2019-05-30 02:30:04 +00:00
Clang.h [RISCV] Pass -target-abi to -cc1as 2019-03-26 08:01:18 +00:00
CloudABI.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CloudABI.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CommonArgs.cpp [Fuchsia] Support multilib for -fsanitize=address and -fno-exceptions 2019-04-27 00:25:13 +00:00
CommonArgs.h [Fuchsia] Support multilib for -fsanitize=address and -fno-exceptions 2019-04-27 00:25:13 +00:00
Contiki.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Contiki.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CrossWindows.cpp [asan] Add gcc 8's driver option -fsanitize=pointer-compare and -fsanitize=pointer-substract. 2019-04-12 14:14:58 +00:00
CrossWindows.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Cuda.cpp [CUDA][Clang][Bugfix] Add missing CUDA 9.2 case 2019-05-03 17:59:18 +00:00
Cuda.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Darwin.cpp Add back --sysroot support for darwin header search. 2019-05-22 20:39:51 +00:00
Darwin.h Add back --sysroot support for darwin header search. 2019-05-22 20:39:51 +00:00
DragonFly.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DragonFly.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FreeBSD.cpp [asan] Add gcc 8's driver option -fsanitize=pointer-compare and -fsanitize=pointer-substract. 2019-04-12 14:14:58 +00:00
FreeBSD.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Fuchsia.cpp [Driver] Update handling of c++ and runtime directories 2019-05-26 03:39:07 +00:00
Fuchsia.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Gnu.cpp [Driver] -static-pie: add -z text 2019-05-30 01:55:43 +00:00
Gnu.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
HIP.cpp [AMDGPU] gfx1010 clang target 2019-05-13 23:15:59 +00:00
HIP.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Haiku.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Haiku.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Hexagon.cpp Range-style std::find{,_if} -> llvm::find{,_if}. NFC 2019-03-31 08:48:19 +00:00
Hexagon.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Hurd.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Hurd.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Lanai.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Linux.cpp [runtimes] Move libunwind, libc++abi and libc++ to lib/$target/c++ and include/c++ 2019-05-22 21:08:33 +00:00
Linux.h [Driver] Default Android toolchains to noexecstack. 2019-03-28 18:08:28 +00:00
MSP430.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MSP430.h Disable PIC/PIE for MSP430 target 2019-02-12 20:46:00 +00:00
MSVC.cpp [MSVC] If unable to find link.exe from a MSVC installation, look for link.exe next to cl.exe 2019-04-19 19:04:22 +00:00
MSVC.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MSVCSetupApi.h Update clang-cl driver for MSVC 2017. 2017-03-15 16:07:35 +00:00
MinGW.cpp [MinGW] Use SEH by default on AArch64 2019-05-06 21:19:01 +00:00
MinGW.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Minix.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Minix.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsLinux.cpp [Driver] Support object files in addition to static and shared libraries in compiler-rt 2019-03-12 02:12:48 +00:00
MipsLinux.h [Driver] Support object files in addition to static and shared libraries in compiler-rt 2019-03-12 02:12:48 +00:00
Myriad.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Myriad.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
NaCl.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
NaCl.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
NetBSD.cpp [asan] Add gcc 8's driver option -fsanitize=pointer-compare and -fsanitize=pointer-substract. 2019-04-12 14:14:58 +00:00
NetBSD.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
OpenBSD.cpp Remove sanitizer context workaround no longer necessary 2019-02-23 06:19:28 +00:00
OpenBSD.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPCLinux.cpp [PowerPC] [Clang] Port MMX intrinsics and basic test cases to Power 2019-04-23 05:50:24 +00:00
PPCLinux.h [PowerPC] [Clang] Port MMX intrinsics and basic test cases to Power 2019-04-23 05:50:24 +00:00
PS4CPU.cpp [asan] Add gcc 8's driver option -fsanitize=pointer-compare and -fsanitize=pointer-substract. 2019-04-12 14:14:58 +00:00
PS4CPU.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RISCVToolchain.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RISCVToolchain.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Solaris.cpp [asan] Add gcc 8's driver option -fsanitize=pointer-compare and -fsanitize=pointer-substract. 2019-04-12 14:14:58 +00:00
Solaris.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TCE.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TCE.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WebAssembly.cpp [WebAssembly] Support VPtr sanitizer for Emscripten 2019-05-29 18:31:50 +00:00
WebAssembly.h [WebAssembly] Support VPtr sanitizer for Emscripten 2019-05-29 18:31:50 +00:00
XCore.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XCore.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00