[LLVMbugs] [Bug 23129] New: Instrumentation-based PGO doesn't work on OS X (?)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Apr 5 13:55:11 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23129
Bug ID: 23129
Summary: Instrumentation-based PGO doesn't work on OS X (?)
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: nicolasweber at gmx.de
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
I'm trying to follow the
http://clang.llvm.org/docs/UsersManual.html#profile-guided-optimization
instructions for building ninja. I can't seem to get it to work -- either I'm
holding it wrong, or it broke when it got reshuffled.
I'm doing:
$ git clone https://github.com/martine/ninja.git
Cloning into 'ninja'...
remote: Counting objects: 8458, done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 8458 (delta 15), reused 0 (delta 0), pack-reused 8422
Receiving objects: 100% (8458/8458), 1.86 MiB | 635.00 KiB/s, done.
Resolving deltas: 100% (5974/5974), done.
Checking connectivity... done.
$ cd ninja
$ CXX=/Users/thakis/src/llvm-build/bin/clang++ CFLAGS="-stdlib=libstdc++
-fprofile-instr-generate -isysroot $(xcrun -show-sdk-path)"
LDFLAGS='-stdlib=libstdc++ -fprofile-instr-generate' ./configure.py
warning: A compatible version of re2c (>= 0.11.3) was not found; changes to
src/*.in.cc will not affect your build.
wrote build.ninja.
$ ninja -v
[1/24] /Users/thakis/src/llvm-build/bin/clang++ -MMD -MT build/build.o -MF
build/build.o.d -g -Wall -Wextra -Wno-deprecated -Wno-unused-parameter
-fno-rtti -fno-exceptions -fvisibility=hidden -pipe
-Wno-missing-field-initializers '-DNINJA_PYTHON="python"' -O2 -DNDEBUG
-fdiagnostics-color -DNINJA_HAVE_BROWSE -stdlib=libstdc++
-fprofile-instr-generate -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
-c src/build.cc -o build/build.o
# ... (omitted, just wanted to show that the flags are there)
[24/24] /Users/thakis/src/llvm-build/bin/clang++ -Lbuild -stdlib=libstdc++
-fprofile-instr-generate -o ninja build/ninja.o -lninja
$ ./ninja manifest_parser_perftest
[2/2] LINK manifest_parser_perftest
Nicos-MBP-8:ninja thakis$ ./manifest_parser_perftest
Creating manifest data...done.
1128ms (hash: c617022)
1117ms (hash: c617022)
1145ms (hash: c617022)
1131ms (hash: c617022)
1148ms (hash: c617022)
min 1117ms max 1148ms avg 1133.8ms
$ ls -l default.profraw
-rw-r--r-- 1 thakis staff 0 Apr 5 13:56 default.profraw
Note that default.profraw is getting generated, but it ends up empty.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150405/d70726c1/attachment.html>
More information about the llvm-bugs
mailing list