From 165a8845f8ae72b5a7abbfaf348bf78e18fc1d0b Mon Sep 17 00:00:00 2001 From: Sriraman Tallam Date: Wed, 19 Oct 2016 20:24:06 +0000 Subject: New clang option -mpie-copy-relocations to use copy relocations for PIE builds. Differential Revision: https://reviews.llvm.org/D19996 llvm-svn: 284638 --- clang/lib/CodeGen/BackendUtil.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/CodeGen') diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 346aa0beb16..367cace096a 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -595,6 +595,8 @@ void EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) { Options.MCOptions.MCNoExecStack = CodeGenOpts.NoExecStack; Options.MCOptions.MCIncrementalLinkerCompatible = CodeGenOpts.IncrementalLinkerCompatible; + Options.MCOptions.MCPIECopyRelocations = + CodeGenOpts.PIECopyRelocations; Options.MCOptions.MCFatalWarnings = CodeGenOpts.FatalWarnings; Options.MCOptions.AsmVerbose = CodeGenOpts.AsmVerbose; Options.MCOptions.PreserveAsmComments = CodeGenOpts.PreserveAsmComments; -- cgit v1.2.3