Skip to content
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

Make ILCompiler more flexible. - #2272

Merged
marek-safar merged 1 commit into
dotnet:mainfrom
Unity-Technologies:master-ilasm-in-cwd
Sep 10, 2021
Merged

marek-safar merged 1 commit into
dotnet:mainfrom
Unity-Technologies:master-ilasm-in-cwd

Conversation

@mrvoorhe

@mrvoorhe mrvoorhe commented Sep 9, 2021

Copy link
Copy Markdown
Contributor

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 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.

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
marek-safar merged commit 0c359ea into dotnet:main 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants