-
Notifications
You must be signed in to change notification settings - Fork 206
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
Make it possible to link NativeAOT outputs #72
Merged
MichalStrehovsky
merged 1 commit into
dotnet:NativeAOT
from
MichalStrehovsky:fixLinking
Aug 28, 2020
Merged
Make it possible to link NativeAOT outputs #72
MichalStrehovsky
merged 1 commit into
dotnet:NativeAOT
from
MichalStrehovsky:fixLinking
Aug 28, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes issues with missing symbols. Take out a piece of the type loader that requires System.Private.TypeLoader.Native that we didn't bring over for now. isa_detection.cpp doesn't build in NativeAOT because it doesn't include any headers that would define things like WszLoadLibraryEx or LOAD_LIBRARY_SEARCH_SYSTEM32. It feels like this needs to be factored to use GCToOSInterface but this is not my area of expertise. Remove reference to __fail_fast that was deleted as part of getting rid of cppcodegen in dotnet#21.
jkotas
approved these changes
Aug 28, 2020
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.
LGTM
Opened dotnet/runtime#41515 for the GC part. |
MichalStrehovsky
added a commit
to MichalStrehovsky/runtimelab
that referenced
this pull request
Aug 31, 2020
Before this change, running link.exe on the output of the compilation produced `LINK : fatal error LNK1561: entry point must be defined`. This took longer to figure out than I would be willing to admit. There are two things at play - linker uses the presence of a method named `main` or `wmain` to choose between setting `wmainCRTStartup` or `mainCRTStartup` as the actual entrypoint of the application (C apps don't start with `main` - they start in the C runtime library that calls `main`). In dotnet#21 we deleted the `__fail_fast` method from main.cpp and then in dotnet#72 we also removed the compiler reference to the now non-existent symbol. The obscure result of that was that main.obj stopped being part of the linking set because nothing now references symbols from it. When linker looks for `main` or `wmain`, it only looks at object files that are already part of the linking set. As a result, linker didn't inject `wmainCRTStartup` as the entrypoint and we failed with the above message. It looks like the only way out is to hardcode the CRT implementation detail here. We were already hardcoding it, but for other reasons. We also need to set the subsystem since the autodetection is failing.
jkotas
pushed a commit
that referenced
this pull request
Aug 31, 2020
Before this change, running link.exe on the output of the compilation produced `LINK : fatal error LNK1561: entry point must be defined`. This took longer to figure out than I would be willing to admit. There are two things at play - linker uses the presence of a method named `main` or `wmain` to choose between setting `wmainCRTStartup` or `mainCRTStartup` as the actual entrypoint of the application (C apps don't start with `main` - they start in the C runtime library that calls `main`). In #21 we deleted the `__fail_fast` method from main.cpp and then in #72 we also removed the compiler reference to the now non-existent symbol. The obscure result of that was that main.obj stopped being part of the linking set because nothing now references symbols from it. When linker looks for `main` or `wmain`, it only looks at object files that are already part of the linking set. As a result, linker didn't inject `wmainCRTStartup` as the entrypoint and we failed with the above message. It looks like the only way out is to hardcode the CRT implementation detail here. We were already hardcoding it, but for other reasons. We also need to set the subsystem since the autodetection is failing.
scalablecory
pushed a commit
that referenced
this pull request
Sep 22, 2020
The 1 second wiggle room still had the watchdog fire and the clean up code path seemed to still be running.
MichalStrehovsky
pushed a commit
to MichalStrehovsky/runtimelab
that referenced
this pull request
Oct 15, 2021
…et#72) Added TrimmerSettings as a way to pass additional knobs to the trimmer. Method body scanning is now deferred and executed in parallel (this happens in waves since each wave will add more bodies to scan, each wave is run in parallel). Module writing is done in parallel.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes issues with missing symbols.
Take out a piece of the type loader that requires System.Private.TypeLoader.Native that we didn't bring over for now.
isa_detection.cpp doesn't build in NativeAOT because it doesn't include any headers that would define things like WszLoadLibraryEx or LOAD_LIBRARY_SEARCH_SYSTEM32. It feels like this needs to be factored to use GCToOSInterface but this is not my area of expertise.
Remove reference to __fail_fast that was deleted as part of getting rid of cppcodegen in #21.