Comments (3)
You can compile an x86_64-linux-gnu cross compiler toolchain for Windows. But I recommend just running Linux in a virtual machine and using that to compile. Builds actually go faster in a virtual machine on Windows than on Windows itself. It's not possible to support a MinGW toolchain because it uses COFF, which imposes restrictions on things like the length of section names that would otherwise make Actually Portable Executable impossible. The same is true of Mach-O. You have to use an ELF toolchain. It's totally possible to have an ELF toolchain on Windows. It's just prebuilt binaries for such a thing are hard to find online and it's hard to configure a build from scratch to create them.
from cosmopolitan.
Regarding the integrated linker, I'm assuming you're referring to 81ef162 which is discussed further in https://github.com/jart/cosmopolitan/blob/master/third_party/chibicc/README.cosmo An integrated linker would be nice, since the chibicc compiler can be built as an actually portable executable. Keep in mind it's not a replacement for GCC which has decades of development behind it and can generally produce code that's twice as fast.
from cosmopolitan.
There's now a tutorial on the website on how to build Actually Portable Executables on Windows. Static binaries are provided of an x86_64-linux-gnu cross-compiler toolchain which runs on Windows. https://justine.lol/cosmopolitan/windows-compiling.html
from cosmopolitan.
Related Issues (20)
- Allow replacing `jartsr=` magic with `#!/bin/sh` header
- cosmocc segfaults on static struct sigaction HOT 2
- confstr() is declared in <stdio.h> rather than <unistd.h>
- Python binary is packaged without certificates HOT 4
- [Windows] execve regression
- test/posix/fread3gb_test fails on XnuSilicon
- cosmo.zip offiline? HOT 3
- llamafile --assimilate: corrupted program header size HOT 1
- test/libc/calls/open_test: open_readOnlyCreatMode gives wrong errno, but not with --strace, on linux aarch64 HOT 1
- Bug: Mac llamafile make issue HOT 1
- testing github autolabeler label is too noisy
- Bug: On Windows, cosmos GNU coreutils ls not printing correct result for `ls ../../` HOT 6
- compile_commands.json generator for clangd integration HOT 1
- Bug: Lua fails a `seek`-related test
- Bug: Lua's `ltests.c` doesn't compile
- Bug: secondary redbean SQLite WAL connections lock after first write HOT 4
- With set_toolchains("@cosmocc") : fatal error: string: No such file or directory HOT 4
- Feature Request: use versioned files at https://cosmo.zip/pub/cosmos/zip/
- Bug: cosmo rsync appears to hang on Windows arm64 HOT 5
- Typo in new specification HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cosmopolitan.