File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ fn main() {
21
21
"InstrProfilingPlatformLinux.c" ,
22
22
"InstrProfilingPlatformOther.c" ,
23
23
"InstrProfilingPlatformWindows.c" ,
24
- "InstrProfilingRuntime.cc" ,
25
24
"InstrProfilingUtil.c" ,
26
25
"InstrProfilingValue.c" ,
27
26
"InstrProfilingWriter.c" ,
@@ -68,10 +67,16 @@ fn main() {
68
67
let root = env:: var_os ( "RUST_COMPILER_RT_ROOT" ) . unwrap ( ) ;
69
68
let root = Path :: new ( & root) ;
70
69
70
+ let src_root = root. join ( "lib" ) . join ( "profile" ) ;
71
71
for src in profile_sources {
72
- cfg. file ( root . join ( "lib" ) . join ( "profile" ) . join ( src) ) ;
72
+ cfg. file ( src_root . join ( src) ) ;
73
73
}
74
74
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
+
75
80
cfg. include ( root. join ( "include" ) ) ;
76
81
cfg. warnings ( false ) ;
77
82
cfg. compile ( "profiler-rt" ) ;
You can’t perform that action at this time.
0 commit comments