The language needs some kind of cross-platform runtime instead of relying on the gcc C runtime. (I believe we use crt1 found in /lib on linux?). This will eventually bring us closer to full windows and mac support.
Benefits
This not only allows a larger degree of control over the execution of code in BCL, but we can also have things like default initialized global variables which are otherwise impossible without a runtime to ensure that those global actually get initialized.'
Features needed to accomplish this
[x] Compiler directives for platform
[ ] multi-platform support for the standard library, meaning we need to stop binding libc functions
[ ] consts, this isn't completely required, but makes it much easier
[ ] compiler emitting necessary constants available at RT compilation time (CRT gets recompiled and linked in, not imported)
[ ] compiler flag that can be set to use a custom runtime
Possible issues that may make this feature difficult to implement
Creating a runtime can run into many issues, especially a cross-platform one. Not to mention trying to ensure everything works while updating BCL may be a pain. It may be worth looking into setting up something like azure devops. Unfortunately this is hard to setup as compiling llvmlite (a necessary dependency) is annoying. Especially as of recently.
turns out this is less possible than I thought. We must rely on the c runtime, but we can use the libc entry symbol. This basically means we use 2 runtimes. very fun.
Description of the feature
The language needs some kind of cross-platform runtime instead of relying on the gcc C runtime. (I believe we use crt1 found in /lib on linux?). This will eventually bring us closer to full windows and mac support.
Benefits
This not only allows a larger degree of control over the execution of code in BCL, but we can also have things like default initialized global variables which are otherwise impossible without a runtime to ensure that those global actually get initialized.'
Features needed to accomplish this
Changing the runtime at compilation
Possible issues that may make this feature difficult to implement
Creating a runtime can run into many issues, especially a cross-platform one. Not to mention trying to ensure everything works while updating BCL may be a pain. It may be worth looking into setting up something like azure devops. Unfortunately this is hard to setup as compiling llvmlite (a necessary dependency) is annoying. Especially as of recently.