We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/jart/cosmopolitan
#4704
see https://github.com/xmake-io/xmake/tree/master/tests/projects/c/cosmocc
add_rules("mode.debug", "mode.release") add_requires("cosmocc") target("test") set_kind("binary") add_files("src/*.c") set_toolchains("@cosmocc")
add_rules("mode.release", "mode.debug") add_requires("cosmocc") set_toolchains("@cosmocc") target("foo") set_kind("static") add_files("src/foo.c") target("demo") set_kind("binary") add_deps("foo") add_files("src/main.c")
ruki:console$ xmake checking for platform ... linux checking for architecture ... x86_64 note: install or modify (m) these packages (pass -y to skip confirm)? in xmake-repo: -> cosmocc 3.2.4 please input: y (y/n/m) => install cosmocc 3.2.4 .. ok [ 25%]: cache compiling.release src/main.c [ 50%]: linking.release test [100%]: build ok, spent 1.548s ruki:console$ xmake run hello world
ruki:console$ xmake -v [ 25%]: cache compiling.release src/main.c /home/ruki/.xmake/packages/c/cosmocc/3.2.4/f3d565918c3c4585af8de6edefe141a3/bin/cosmocc -c -fvisibility=hidden -O3 -DNDEBUG -o build/.objs/test/linux/x86_64/release/src/main.c.o src/main.c checking for flags (-MMD -MF) ... ok checking for flags (-fdiagnostics-color=always) ... ok checking for cosmoc++ ... /home/ruki/.xmake/packages/c/cosmocc/3.2.4/f3d565918c3c4585af8de6edefe141a3/bin/cosmoc++ checking for the linker (ld) ... cosmoc++ checking for /home/ruki/.xmake/packages/c/cosmocc/3.2.4/f3d565918c3c4585af8de6edefe141a3/bin/cosmoc++ ... ok checking for flags (-fPIC) ... ok [ 50%]: linking.release test /home/ruki/.xmake/packages/c/cosmocc/3.2.4/f3d565918c3c4585af8de6edefe141a3/bin/cosmoc++ -o build/linux/x86_64/release/test build/.objs/test/linux/x86_64/release/src/main.c.o [100%]: build ok, spent 1.652s
We need to run cosmocc on Msys2, because cosmocc is a shell script, it need to run bash/sh.
wangrunqing@IIGS-A8825-D MINGW64 /d/projects/personal/xmake/tests/projects/c/cosmocc/console $ xmake checking for platform ... mingw checking for architecture ... x86_64 checking for mingw directory ... C:/msys64/mingw64 note: install or modify (m) these packages (pass -y to skip confirm)? in xmake-repo: -> cosmocc 3.2.4 please input: y (y/n/m) => download https://github.com/xmake-mirror/cosmopolitan/releases/download/3.2.4/cosmocc-3.2.4.zip .. ok => install cosmocc 3.2.4 .. ok [ 25%]: cache compiling.release src\main.c [ 50%]: linking.release test.exe [100%]: build ok, spent 9.453s wangrunqing@IIGS-A8825-D MINGW64 /d/projects/personal/xmake/tests/projects/c/cosmocc/console $ xmake run hello world
ruki:static_library ruki$ xmake checking for platform ... macosx checking for architecture ... x86_64 checking for Xcode directory ... /Applications/Xcode.app checking for Codesign Identity of Xcode ... Apple Development: [email protected] (T3NA4MRVPU) checking for SDK version of Xcode for macosx (x86_64) ... 14.0 checking for Minimal target version of Xcode for macosx (x86_64) ... 14.0 [ 25%]: cache compiling.release src/foo.c [ 25%]: cache compiling.release src/main.c [ 50%]: archiving.release libfoo.a [ 75%]: linking.release demo [100%]: build ok, spent 3.099s ruki:static_library ruki$ xmake run add(1, 2) = 3
The text was updated successfully, but these errors were encountered:
I have added cosmocc package for windows. xmake-io/xmake-repo#3248
But we need to install sh/bash and update xmake/core to dev version.
Sorry, something went wrong.
No branches or pull requests
build-once run-anywhere
https://github.com/jart/cosmopolitan
Roadmap
#4704
Example projects
see https://github.com/xmake-io/xmake/tree/master/tests/projects/c/cosmocc
Console
Static library
Linux
Windows/Msys2
We need to run cosmocc on Msys2, because cosmocc is a shell script, it need to run bash/sh.
MacOS
The text was updated successfully, but these errors were encountered: