llvm-project/clang/lib/Driver
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
..
ToolChains [Driver] Render target options (e.g. -fuse-init-array) for -fembed-bitcode 2019-05-30 02:30:04 +00:00
Action.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt [PowerPC] [Clang] Port MMX intrinsics and basic test cases to Power 2019-04-23 05:50:24 +00:00
Compilation.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DarwinSDKInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Distro.cpp Debian: Add two missing version code in sid 2019-04-19 13:48:52 +00:00
Driver.cpp [Driver] Search the toolchain dir with -print-file-name 2019-05-29 00:01:05 +00:00
DriverOptions.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InputInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Job.cpp Fix unquoted spaces in args in clang --verbose output 2019-04-24 09:06:03 +00:00
Multilib.cpp [Driver] Support priority for multilibs 2019-04-27 00:25:11 +00:00
Phases.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SanitizerArgs.cpp [asan] Add gcc 8's driver option -fsanitize=pointer-compare and -fsanitize=pointer-substract. 2019-04-12 14:14:58 +00:00
Tool.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ToolChain.cpp [Driver] Change layout of per-target runtimes to resemble multiarch 2019-05-27 23:23:50 +00:00
Types.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XRayArgs.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00