-
Couldn't load subscription status.
- Fork 561
[AOT] provide libc and libm stubs for correct linking when NDK is not used #7475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
660fb33
86c9dcf
8a3b808
5ca26c7
6b00842
25a1bd6
fbc4cf4
8d81ccb
1bea16c
63db768
3dab27d
33e6610
ffd8e43
edea1e9
057d2f9
f8b82c1
79421d3
523a2bb
3266732
c121ad4
976f8c2
e8b9e61
8d4672d
5be3d8b
2b53bd8
3b2cb45
3155aca
64e5fb6
8e6f958
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #if !defined (STUB_LIB_NAME) | ||
| #error STUB_LIB_NAME must be defined on command line | ||
| #endif | ||
|
|
||
| void STUB_LIB_NAME () | ||
| { | ||
| // no-op | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -749,8 +749,30 @@ public void RunWithLLVMEnabled () | |
| else | ||
| AdbStartActivity ($"{proj.PackageName}/{proj.JavaPackageName}.MainActivity"); | ||
|
|
||
| Assert.IsTrue (WaitForActivityToStart (proj.PackageName, "MainActivity", | ||
| Path.Combine (Root, builder.ProjectDirectory, "startup-logcat.log"))); | ||
| var activityNamespace = proj.PackageName; | ||
| var activityName = "MainActivity"; | ||
| var logcatFilePath = Path.Combine (Root, builder.ProjectDirectory, "startup-logcat.log"); | ||
| var failedToLoad = new List<string> (); | ||
| bool appLaunched = MonitorAdbLogcat ((line) => { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @grendello, @dellis1972: how does this updated test look for verifying that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @grendello, @dellis1972 : my attempted unit test change failed. Is that because things aren't working properly, or because the test is looking for the wrong thing? My guess is that Also, those names look weird, e.g. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lines ending with @jonathanpeppers originally found the problem in And indeed, when you look at symbols referenced by However, @jonathanpeppers's test was with one of the NET7 RC builds, so perhaps something has changed inbetween? Also with regard to library names? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With regards to names, I've just checked and we still rename the .so libraries to have the The reason you see the unprefixed names in error messages is that this is what MonoVM asks us to load, it isn't aware of the Consider this fragment of the Note that all of the entries map the various mutations of the name to the name that's actually in the package - the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the test passing because When I hit the original problem, I was building on Azure DevOps with an NDK in a non-standard location -- would be the same as not having an NDK installed at all. I solved the problem by doing: -p:AndroidNdkDirectory=$(ANDROID_NDK_HOME) |
||
| if (SeenFailedToLoad (line)) | ||
| failedToLoad.Add (line); | ||
| return SeenActivityDisplayed (line); | ||
| }, logcatFilePath, timeout: 120); | ||
|
|
||
| Assert.IsTrue (appLaunched, "LLVM app did not launch"); | ||
| Assert.AreEqual (0, failedToLoad.Count, $"LLVM .so files not loaded:\n{string.Join ("\n", failedToLoad)}"); | ||
|
|
||
| bool SeenActivityDisplayed (string line) | ||
| { | ||
| var idx1 = line.IndexOf ("ActivityManager: Displayed", StringComparison.OrdinalIgnoreCase); | ||
| var idx2 = idx1 > 0 ? 0 : line.IndexOf ("ActivityTaskManager: Displayed", StringComparison.OrdinalIgnoreCase); | ||
| return (idx1 > 0 || idx2 > 0) && line.Contains (activityNamespace) && line.Contains (activityName); | ||
| } | ||
|
|
||
| bool SeenFailedToLoad (string line) | ||
| { | ||
| return line.Contains ("Failed to load shared library"); | ||
| } | ||
| } | ||
|
|
||
| [Test] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we also want to move the ld-name arg down here? I see there is a comment above about making sure both are always passed last.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, to be honest.
ld-nameis an argument which takes a simple value which doesn't appear to confuse the AOT parser. I think I'd leave it where it is, especially that everything seems to have worked fine after theld-flagsrepositioning.