<div dir="ltr"><div><div>$ ld -v</div><div><br></div><div>@(#)PROGRAM:ld  PROJECT:ld64-224.1</div><div>configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 armv6m armv7m armv7em</div><div>LTO support using: LLVM version 3.3svn, from Apple Clang 5.0 (build 500.2.79)</div>
</div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">$ /Users/buildbot/src/llvm-</span><span style="font-family:arial,sans-serif;font-size:13px">buildbot/slave/mac10.9-cmake/</span><span style="font-family:arial,sans-serif;font-size:13px">build/llvm_build64/bin/clang -fprofile-instr-generate -o /Users/buildbot/src/llvm-</span><span style="font-family:arial,sans-serif;font-size:13px">buildbot/slave/mac10.9-cmake/</span><span style="font-family:arial,sans-serif;font-size:13px">build/compiler_rt_build/test/</span><span style="font-family:arial,sans-serif;font-size:13px">profile/Output/instrprof-</span><span style="font-family:arial,sans-serif;font-size:13px">basic.c.tmp -O3 -flto  /Users/buildbot/src/llvm-</span><span style="font-family:arial,sans-serif;font-size:13px">buildbot/slave/mac10.9-cmake/</span><span style="font-family:arial,sans-serif;font-size:13px">build/llvm/projects/compiler-</span><span style="font-family:arial,sans-serif;font-size:13px">rt/test/profile/instrprof-</span><span style="font-family:arial,sans-serif;font-size:13px">basic.c -###</span><br>
</div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><div>clang version 3.5.0 (205309)</div><div>Target: x86_64-apple-darwin13.1.0</div><div>Thread model: posix</div><div> "/Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/llvm_build64/bin/clang-3.5" "-cc1" "-triple" "x86_64-apple-macosx10.9.0" "-emit-llvm-bc" "-disable-free" "-main-file-name" "instrprof-basic.c" "-mrelocation-model" "pic" "-pic-level" "2" "-mdisable-fp-elim" "-masm-verbose" "-munwind-tables" "-target-cpu" "core2" "-fprofile-instr-generate" "-resource-dir" "/Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/llvm_build64/bin/../lib/clang/3.5.0" "-O3" "-fdebug-compilation-dir" "/Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/compiler_rt_build" "-ferror-limit" "19" "-fmessage-length" "212" "-stack-protector" "1" "-mstackrealign" "-fblocks" "-fobjc-runtime=macosx-10.9.0" "-fencode-extended-block-signature" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-vectorize-loops" "-vectorize-slp" "-o" "/var/tmp/instrprof-basic-c10d1f.o" "-x" "c" "/Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/llvm/projects/compiler-rt/test/profile/instrprof-basic.c"</div>
<div> "/usr/bin/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.9.0" "-o" "/Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/compiler_rt_build/test/profile/Output/instrprof-basic.c.tmp" "/var/tmp/instrprof-basic-c10d1f.o" "/Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/llvm_build64/bin/../lib/clang/3.5.0/lib/darwin/libclang_rt.profile_osx.a" "-lSystem"</div>
</div><div><br></div>cmake version 2.8.10<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 1, 2014 at 5:54 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
On 2014 Apr 1, at 06:50, Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com">dexonsmith@apple.com</a>> wrote:<br>
<br>
><br>
> On 2014 Apr 1, at 01:12, Alexey Samsonov <<a href="mailto:samsonov@google.com">samsonov@google.com</a>> wrote:<br>
><br>
>> Hi Duncan,<br>
>> We see the following error on our (still private) Mac buildbot. Do you have an idea what might be wrong?<br>
>><br>
>> Script:<br>
>> --<br>
>> /Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/llvm_build64/bin/clang -fprofile-instr-generate -o /Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/compiler_rt_build/test/profile/Output/instrprof-basic.c.tmp -O3 -flto  /Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/llvm/projects/compiler-rt/test/profile/instrprof-basic.c<br>

>> env LLVM_PROFILE_FILE=/Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/compiler_rt_build/test/profile/Output/instrprof-basic.c.tmp.profraw /Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/compiler_rt_build/test/profile/Output/instrprof-basic.c.tmp<br>

>> llvm-profdata merge -o /Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/compiler_rt_build/test/profile/Output/instrprof-basic.c.tmp.profdata /Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/compiler_rt_build/test/profile/Output/instrprof-basic.c.tmp.profraw<br>

>> /Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/llvm_build64/bin/clang -fprofile-instr-use=/Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/compiler_rt_build/test/profile/Output/instrprof-basic.c.tmp.profdata -o - -S -emit-llvm /Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/llvm/projects/compiler-rt/test/profile/instrprof-basic.c | FileCheck /Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/llvm/projects/compiler-rt/test/profile/instrprof-basic.c<br>

>> --<br>
>> Exit Code: 1<br>
>><br>
>> Command Output (stderr):<br>
>> --<br>
>> ld: warning: ignoring file /var/tmp/instrprof-basic-164f0d.o, lto file was built for x86_64 which is not the architecture being linked (x86_64): /var/tmp/instrprof-basic-164f0d.o<br>
>> Undefined symbols for architecture x86_64:<br>
>>  "_main", referenced from:<br>
>>     implicit entry/start for main executable<br>
>> ld: symbol(s) not found for architecture x86_64<br>
>> clang-3.5: error: linker command failed with exit code 1 (use -v to see invocation)<br>
><br>
> Mysterious.  I'm on 10.9 myself and I'm not seeing that error.<br>
><br>
> If you send me the output of:<br>
><br>
>    $ ld -v<br>
>    $ /Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/llvm_build64/bin/clang -fprofile-instr-generate -o /Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/compiler_rt_build/test/profile/Output/instrprof-basic.c.tmp -O3 -flto  /Users/buildbot/src/llvm-buildbot/slave/mac10.9-cmake/build/llvm/projects/compiler-rt/test/profile/instrprof-basic.c -###<br>

<br>
</div></div>Please also send me the cmake line you used, as well as:<br>
<br>
    $ cmake --version<br>
<div class="HOEnZb"><div class="h5"><br>
> I can look into it.<br>
><br>
> If this is blocking you, go ahead and remove -flto from the test<br>
> until we sort this out (please add a FIXME though).<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div>
</div>