Skip to content

[runtime] Implement computing and passing the NATIVE_DLL_SEARCH_DIRECTORIES runtime property. Fixes #10504. - #12309

Merged
rolfbjarne merged 1 commit into
dotnet:mainfrom
rolfbjarne:native-dll-search-directories
Aug 2, 2021
Merged

rolfbjarne merged 1 commit into
dotnet:mainfrom
rolfbjarne:native-dll-search-directories

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

This adds support to compute the NATIVE_DLL_SEARCH_DIRECTORIES value and pass
it to the runtime. It's the last property listed in #10504, so this fixes that
issue.

Fixes #10504

…TORIES runtime property. Fixes dotnet#10504.

This adds support to compute the NATIVE_DLL_SEARCH_DIRECTORIES value and pass
it to the runtime. It's the last property listed in dotnet#10504, so this fixes that
issue.

Fixes dotnet#10504
@rolfbjarne rolfbjarne added not-notes-worthy Ignore for release notes run-dotnet-tests Run all the .NET tests labels Jul 30, 2021
Comment thread runtime/runtime.m

// Join them all together with a colon separating them
NSString *joined = [directories componentsJoinedByString: @":"];
char *rv = xamarin_strdup_printf ("%s", [joined UTF8String]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return value from that function is only valid for as long as the NSString is alive: "The returned C string is guaranteed to be valid only until either the receiver is freed". I could use getCString:maxLength:encoding: instead, but that ends up making the code somewhat longer and more complex, and this is a one-time thing at startup, so I don't think it matters all that much.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

❌ [PR Build] Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff

API & Generator diff

✅ API Diff (from PR only) (no change)
✅ Generator Diff (no change)

GitHub pages

Results can be found in the following github pages (it might take some time to publish):

Test results

1 tests failed, 115 tests passed.

Failed tests

  • monotouch-test/Mac Catalyst/Debug [dotnet]: Failed (Tests run: 2629 Passed: 2490 Inconclusive: 35 Failed: 1 Ignored: 138)

Pipeline on Agent XAMBOT-1104.BigSur'
Merge 7ebdcc0 into 39df6c5

@rolfbjarne

Copy link
Copy Markdown
Member Author

@rolfbjarne
rolfbjarne merged commit 440ff7c into dotnet:main Aug 2, 2021
@rolfbjarne
rolfbjarne deleted the native-dll-search-directories branch August 2, 2021 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-notes-worthy Ignore for release notes run-dotnet-tests Run all the .NET tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Xamarin iOS should call monovm_initialize for .NET 6

4 participants