File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ fn main() {
2121 "InstrProfilingPlatformLinux.c" ,
2222 "InstrProfilingPlatformOther.c" ,
2323 "InstrProfilingPlatformWindows.c" ,
24- "InstrProfilingRuntime.cc" ,
2524 "InstrProfilingUtil.c" ,
2625 "InstrProfilingValue.c" ,
2726 "InstrProfilingWriter.c" ,
@@ -68,10 +67,16 @@ fn main() {
6867 let root = env:: var_os ( "RUST_COMPILER_RT_ROOT" ) . unwrap ( ) ;
6968 let root = Path :: new ( & root) ;
7069
70+ let src_root = root. join ( "lib" ) . join ( "profile" ) ;
7171 for src in profile_sources {
72- cfg. file ( root . join ( "lib" ) . join ( "profile" ) . join ( src) ) ;
72+ cfg. file ( src_root . join ( src) ) ;
7373 }
7474
75+ // The file was renamed in LLVM 10.
76+ let old_runtime_path = src_root. join ( "InstrProfilingRuntime.cc" ) ;
77+ let new_runtime_path = src_root. join ( "InstrProfilingRuntime.cpp" ) ;
78+ cfg. file ( if old_runtime_path. exists ( ) { old_runtime_path } else { new_runtime_path } ) ;
79+
7580 cfg. include ( root. join ( "include" ) ) ;
7681 cfg. warnings ( false ) ;
7782 cfg. compile ( "profiler-rt" ) ;
You can’t perform that action at this time.
0 commit comments