File tree 1 file changed +13
-3
lines changed
1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,13 @@ fn main() -> Result<(), Box<dyn Error>> {
168
168
169
169
let mut redefinitions_file = BufWriter :: new ( File :: create ( & redefined_symbols) . unwrap ( ) ) ;
170
170
171
+ let rn_prefix = if cfg ! ( target_os = "macos" ) {
172
+ // macOS symbols have an extra `_`
173
+ "__RN"
174
+ } else {
175
+ "_RN"
176
+ } ;
177
+
171
178
let zn_prefix = if cfg ! ( target_os = "macos" ) {
172
179
// macOS symbols have an extra `_`
173
180
"__ZN"
@@ -188,11 +195,14 @@ fn main() -> Result<(), Box<dyn Error>> {
188
195
}
189
196
let ( _, symbol) = line. rsplit_once ( ' ' ) . unwrap ( ) ;
190
197
191
- if symbol. starts_with ( zn_prefix) {
198
+ if symbol. starts_with ( rn_prefix) {
199
+ let ( _prefix, renamed) = symbol. split_once ( "__rustc" ) . unwrap ( ) ;
200
+ let ( size, renamed) = renamed. split_once ( '_' ) . unwrap ( ) ;
201
+ writeln ! ( redefinitions_file, "{symbol} {replacement}{size}{renamed}E" ) . unwrap ( ) ;
202
+ } else if symbol. starts_with ( zn_prefix) {
192
203
writeln ! (
193
204
redefinitions_file,
194
- "{} {}" ,
195
- symbol,
205
+ "{symbol} {}" ,
196
206
symbol. replacen( zn_prefix, & replacement, 1 )
197
207
)
198
208
. unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments