aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-09-11 17:09:54 +0000
committerChris Lattner <sabre@nondot.org>2007-09-11 17:09:54 +0000
commit111e8ce3a2b6279dcc348878349fd459c4ed883c (patch)
treea769499662c6b1c3f56f57ae23bf0d2ee2295f68
parentbba5037740b212066935b465091c37b4ed650d92 (diff)
update this to use llvm-config, patch by Jose M. Moya
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41849 91177308-0d34-0410-b5e6-96231b3b80d8
-rwxr-xr-xutils/profile.pl7
1 files changed, 3 insertions, 4 deletions
diff --git a/utils/profile.pl b/utils/profile.pl
index ad0be073c8..f9950f97fe 100755
--- a/utils/profile.pl
+++ b/utils/profile.pl
@@ -62,11 +62,10 @@ my $BytecodeFile = $ARGV[0];
shift @ARGV;
-my $LLIPath = `which lli`;
-$LLIPath = `dirname $LLIPath`;
-chomp $LLIPath;
+my $libdir = `llvm-config --libdir`;
+chomp $libdir;
-my $LibProfPath = $LLIPath . "/../../Debug/lib/profile_rt.so";
+my $LibProfPath = $libdir . "/profile_rt.so";
system "opt -q -f $ProfilePass $BytecodeFile -o $BytecodeFile.inst";
system "lli -fake-argv0 '$BytecodeFile' -load $LibProfPath " .