[llvm-dev] How does -fPIE get passed from clang to llc when run on a .ll file?

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Sun Nov 8 20:10:36 PST 2015


On 6 November 2015 at 11:23, Akira Hatanaka <ahatanak at gmail.com> wrote:
> If the target platform is linux and -fPIE is on the command line, clang sets
> TargetOptions::PositionIndependentExecutable in
> EmitAssemblyHelper::CreateTargetrMachine.

I was looking in a hurry at the time, but to me it seemed that was
under the "clang -cc1" execution and there was nothing on that
command-line to indicate PIE. I'd swear I even set a breakpoint there
and it got set wrongly. Maybe only the platforms that care have wired
it up or something.

Cheers.

Tim.


More information about the llvm-dev mailing list