Skip to content

Possible to reduce/remove the need for old CRT/MSVC/Win SDKs? #52

@playmer

Description

@playmer

This is likely a naive question, and I'm sure I'm missing some pieces of the puzzle, but I'm curious what we actually need from the CRT and MSVC toolchains?

From poking around it does sound like from #51 and #36 that there's some need from the CRT for intrinsics. But maybe that can be sidestepped with the changed mentioned in #51.

We need a way to link against Kernel32 as well as probably a few other Win32 libraries. We don't (I think) need an SDK for this as far as I can tell, knowing the symbols Windows provides should be enough, we can create our own Import lib with that using some of the tools llvm provides.

And I know peeking at the sample that we seem to need a justfile so we can edit the binary after the fact to adjust some of the PE header fields. The latest lld-link seems to be able to make these adjustments itself from my experiments. Would it be possible to adjust the targets to use lld-link and make these adjustments itself to get rid of the justfile complication?

For context I've mostly been experimenting with targeting Win9x with new C++ compilers without needing an old (potentially gray area) CRT/compiler. Part of this is being interested in providing a more modern C Runtime (and eventually STL) and I had some interest in experimenting with Rust for this. I'm not sure how far I'd ever get with finalizing some of my work, but I thought maybe some of my experiments would be helpful for rust9x.

Totally understand though if I'm not on the right path though, sorry if you've tried/thought of some of this and I missed it 😅.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions