File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
src/bootstrap/src/core/build_steps Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -1037,13 +1037,18 @@ impl Step for Lld {
1037
1037
// when doing PGO on CI, cmake or clang-cl don't automatically link clang's
1038
1038
// profiler runtime in. In that case, we need to manually ask cmake to do it, to avoid
1039
1039
// linking errors, much like LLVM's cmake setup does in that situation.
1040
- if builder. config . llvm_profile_generate && target. is_msvc ( ) {
1041
- if let Some ( clang_cl_path) = builder. config . llvm_clang_cl . as_ref ( ) {
1042
- // Find clang's runtime library directory and push that as a search path to the
1043
- // cmake linker flags.
1044
- let clang_rt_dir = get_clang_cl_resource_dir ( builder, clang_cl_path) ;
1045
- ldflags. push_all ( format ! ( "/libpath:{}" , clang_rt_dir. display( ) ) ) ;
1040
+ if builder. config . llvm_profile_generate {
1041
+ if target. is_msvc ( ) {
1042
+ if let Some ( clang_cl_path) = builder. config . llvm_clang_cl . as_ref ( ) {
1043
+ // Find clang's runtime library directory and push that as a search path to the
1044
+ // cmake linker flags.
1045
+ let clang_rt_dir = get_clang_cl_resource_dir ( builder, clang_cl_path) ;
1046
+ ldflags. push_all ( format ! ( "/libpath:{}" , clang_rt_dir. display( ) ) ) ;
1047
+ }
1048
+ } else {
1049
+ ldflags. push_all ( "-L/opt/homebrew/Cellar/llvm/20.1.2/lib/clang/20/lib/darwin/lib -lclang_rt.profile_osx" ) ;
1046
1050
}
1051
+
1047
1052
}
1048
1053
1049
1054
// LLD is built as an LLVM tool, but is distributed outside of the `llvm-tools` component,
You can’t perform that action at this time.
0 commit comments