Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Build mscorlib on linux #1405

Merged
merged 2 commits into from
Aug 18, 2015
Merged

Conversation

ellismg
Copy link

@ellismg ellismg commented Aug 18, 2015

No description provided.

StackTrace_Stack was conditional between Unix and Windows, which is
problematic when building on Unix, since the Mono provided ResGen does
not understand our define directives. It turns out this string is
unused (in both CoreCLR and Desktop) so to make things easier, we can
just remove it.
Initial work to get mscorlib.dll building via Roslyn + MSBuild running
on top of Mono on Linux.

- Use a newer version of BclRewriter.exe which works cross-platform,
  the major difference here is that now we need to specify the input
  assembly as a named argument instead (since fully qualified paths on
  Unix look like flags on Windows).

- The ResGen we use comes from Mono, which does not support the -d
  flag, so we need to stop passing defines to ResGen. I know the mono
  folks recently did some work to address this, but long term we need
  to move towards getting our ResGen.exe running on CoreCLR and use
  that instead.

- Don't require that mono is installed in order to build coreclr.  If
  mono is not on the path, skip the build step to enable folks to do
  development without Mono. In this case, they will need to continue
  to build mscorlib.dll on Windows, targeting Unix.

- Mono stability has been an issue for folks that have buddy tested
  this. I've found that recent mono 4.2 builds, when run with the
  Boehm GC work well for me. Other folks have other builds they like
  instead. The `skipmscorlib` flag can be passed to build.sh if you
  want to skip building mscorlib.dll locally.
@ellismg
Copy link
Author

ellismg commented Aug 18, 2015

I did not notice that @atsushieno had a PR for a similar approach here until after I had completed this work (which I did because working split across Windows and Linux was getting frustrating) Some key differences are I did not copy all of the CoreFX Managed Build stuff, since much of it did not seem like we needed it. I also didn't add code to generate a native image while running build.sh. That's a clever idea and if @atsushieno wants me to, I'm happy to add it myself or take a patch from him.

@akoeplinger might also be interested in these changes.

@ellismg
Copy link
Author

ellismg commented Aug 18, 2015

@JeremyKuhne
Copy link
Member

Awesome! LGTM

@atsushieno
Copy link

Feel free to reuse any of my changes there :-)

@akoeplinger
Copy link
Member

Linking to @atsushieno's PR as it's not mentioned in this thread: #1275

Changes look good to me, cool to see that we are no longer blocked on BclRewriter :)

@ellismg
Copy link
Author

ellismg commented Aug 18, 2015

@akoeplinger I agree. We are working internally on porting it to the .NET Core surface area and then open sourcing it, as well.

@stephentoub
Copy link
Member

cc: @AlexGhiondea

LGTM

@AlexGhiondea
Copy link

LGTM! Thanks!

stephentoub added a commit that referenced this pull request Aug 18, 2015
@stephentoub stephentoub merged commit 4df67c7 into dotnet:master Aug 18, 2015
@atsushieno
Copy link

awesome!

@weshaggard
Copy link
Member

Thanks @ellismg if there is any further work items please file tracking issues.

@ellismg ellismg deleted the build-mscorlib-on-linux branch August 18, 2015 22:21
@ghost
Copy link

ghost commented Aug 21, 2015

Thanks @ellismg!
Parenthetically, is this related: dotnet/msbuild#156 ?

@ellismg
Copy link
Author

ellismg commented Aug 21, 2015

@jasonwilliams200OK. Yes. Our goal is to get MSBuild to target .NET Core so we can run it on CoreCLR and remove the mono dependency from our build. I don't know how long the work is expected to take however. I do know folks from the MSBuild team are actively engaged and we think completing the work is a high priority.

picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
9 participants