However in line 667 above, the path of the resulting object file is determined by just exchanging the file extension of the init file with a .o extension. That means that if the default init file is used, which is located in PackageCompiler's src directory, the resulting object file is put into the package directory. However, the package directory is not supposed to be written to, or is this kind of write access ok?
When calling
create_library
, PackageCompiler automatically compiles an initialization file, such that users of the library are able to conveniently (and hopefully with fewer errors) initialize Julia. The init file is ultimately compiled incompile_c_init_julia
, https://github.com/JuliaLang/PackageCompiler.jl/blob/7f0607c990003099969f449c28ad2aeffd0671f4/src/PackageCompiler.jl#L663-L671 and the resulting object file is included when creating the library.However in line 667 above, the path of the resulting object file is determined by just exchanging the file extension of the init file with a
.o
extension. That means that if the default init file is used, which is located in PackageCompiler's src directory, the resulting object file is put into the package directory. However, the package directory is not supposed to be written to, or is this kind of write access ok?