Skip to content

Commit 6934379

Browse files
authored
remove method file names with --strip-metadata (#52722)
These should not appear in binaries when this option is specified.
1 parent 5a28cf5 commit 6934379

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/staticdata.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2393,6 +2393,10 @@ static int strip_all_codeinfos__(jl_typemap_entry_t *def, void *_env)
23932393
jl_gc_wb(m, m->source);
23942394
}
23952395
}
2396+
if (jl_options.strip_metadata) {
2397+
record_field_change((jl_value_t**)&m->file, (jl_value_t*)jl_empty_sym);
2398+
m->line = 0;
2399+
}
23962400
jl_value_t *specializations = jl_atomic_load_relaxed(&m->specializations);
23972401
if (!jl_is_svec(specializations)) {
23982402
strip_specializations_((jl_method_instance_t*)specializations);

0 commit comments

Comments
 (0)