This repository was archived by the owner on Sep 25, 2026. It is now read-only.
Repository navigation
Make ILCompiler more flexible. - #2272
Merged
Merged
Conversation
The ILCompiler class is giving me some grief. The first issue is that every test fails if ilasm cannot be located. I think it would be better if only the tests that need ilasm fail when it cannot be found. So instead of locating at construction time, locate ilasm when it is needed. The next issue is that the `#if NETCOREAPP` logic for finding ilasm doesn't work when Mono.Linker.Tests is in our source tree, using our build process. Currently, when we run the Mono.Linker.Tests in our source tree we are actually being routed down the `#else` path because our fork is fairly far behind and our version has `#if ILLINK` instead. That causes us to call `LocateIlasmOnWindows` which doesn't find ilasm when targeting net5. I think it's fairly harmless to check the current directory for ilasm. This is one way I have managed to restore the ability to locate ilasm in our source tree.
marek-safar
approved these changes
Sep 10, 2021
mrvoorhe
added a commit
to Unity-Technologies/linker
that referenced
this pull request
Sep 13, 2021
agocke
pushed a commit
to dotnet/runtime
that referenced
this pull request
Nov 16, 2022
Commit migrated from dotnet/linker@0c359ea
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The ILCompiler class is giving me some grief. These changes make it a little easier to deal with.
The first issue is that every test fails if ilasm cannot be located. I think it would be better if only the tests that need ilasm fail when it cannot be found. So instead of locating at construction time, locate ilasm when it is needed.
The next issue is that the
#if NETCOREAPPlogic for finding ilasm doesn't work when Mono.Linker.Tests is in our source tree, using our build process. Currently, when we run the Mono.Linker.Tests in our source tree we are actually being routed down the#elsepath because our fork is fairly far behind and our version has#if ILLINKinstead. That causes us to callLocateIlasmOnWindowswhich doesn't find ilasm when targeting net5. I think it's fairly harmless to check the current directory for ilasm. This is one way I have managed to restore the ability to locate ilasm in our source tree.