Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Feedback
  • Loading branch information
elinor-fung committed Nov 20, 2025
commit ed1355a38beb0030253f88f3373b8d5f0613cd98
4 changes: 3 additions & 1 deletion src/tasks/AppleAppBuilder/Templates/runtime-coreclr.m
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ size_t get_image_size(void* base_address)

return image_size;
}

return 0;
}

bool get_native_code_data(const struct host_runtime_contract_native_code_context* context, struct host_runtime_contract_native_code_data* data)
Expand All @@ -128,7 +130,6 @@ bool get_native_code_data(const struct host_runtime_contract_native_code_context
if (written <= 0 || (size_t)written >= sizeof(r2r_path) - dir_len)
return false;

// TODO: store and dlclose the handles after the app runs
void* handle = dlopen(r2r_path, RTLD_LAZY | RTLD_LOCAL);
if (handle == NULL)
return false;
Expand Down Expand Up @@ -191,6 +192,7 @@ bool get_native_code_data(const struct host_runtime_contract_native_code_context
#endif
assert (res > 0);

// Contract lasts the lifetime of the app. The app exists before the end of this function.
struct host_runtime_contract host_contract = {
.size = sizeof(struct host_runtime_contract),
.pinvoke_override = &pinvoke_override,
Expand Down