-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
PGOProfile Guided OptimizationsProfile Guided Optimizationsclang-cl`clang-cl` driver. Don't use for other compiler parts`clang-cl` driver. Don't use for other compiler partsplatform:windowsquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
This is my simple compile script. CC is clang-cl.exe, LD is lld-link.exe and PROFILE is the path to clang_rt.profile.lib
%CC% /c /Fotest_pgo.obj -fprofile-generate=pgo.profraw -flto=thin test.cpp
%LD% /out:test_pgo.exe test_pgo.obj %PROFILE%
.\test_pgo.exe
%PD% merge -o default.prof pgo.profraw
%CC% /c /Fotest.obj -fcs-profile-generate -fprofile-use=default.prof -flto=thin test.cpp
%LD% /out:test.exe test.obj %PROFILE% /lto-cs-profile-generate
This leads to the following error:
lld-link: error: undefined symbol: __llvm_profile_counter_bias
>>> referenced by clang_rt.profile.lib(InstrProfilingFile.c.obj):(mmapForContinuousMode)
In another project I also see that __llvm_profile_filename is undefined.
I tired to define these in the source but it doesn't seem to make a difference.
Anyone using CS PGO on Windows? @zmodem @teresajohnson
Metadata
Metadata
Assignees
Labels
PGOProfile Guided OptimizationsProfile Guided Optimizationsclang-cl`clang-cl` driver. Don't use for other compiler parts`clang-cl` driver. Don't use for other compiler partsplatform:windowsquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!