]> granicus.if.org Git - clang/commit
Driver: Make profiling flags work with -nostdlib on Darwin
authorJustin Bogner <mail@justinbogner.com>
Tue, 12 May 2015 00:31:33 +0000 (00:31 +0000)
committerJustin Bogner <mail@justinbogner.com>
Tue, 12 May 2015 00:31:33 +0000 (00:31 +0000)
commite5907a0647b6f6c01187f4d4a32f9b3ce91a3056
tree218a2a282b6e19b527e8784d0ffa3638e154d01a
parent2ecef342b1f3d35908931b65ee2bbc94352bc850
Driver: Make profiling flags work with -nostdlib on Darwin

Compiler-rt's Profiling library isn't part of the stdlib, so -nostdlib
shouldn't prevent it from being linked. This makes Darwin behave like
other toolchains, and link in the profile runtime irrespective of
-nostdlib, since the resulting program can't be run unless you link
this.

I've also added a test to show that other toolchains already behave
like this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237074 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/ToolChains.cpp
lib/Driver/ToolChains.h
lib/Driver/Tools.cpp
test/Driver/instrprof-ld.c