Skip to content

Instantly share code, notes, and snippets.

@marcelmaatkamp
Created June 1, 2021 05:44
Show Gist options
  • Save marcelmaatkamp/2d8f063060fb9594c2c9a6d109193cbf to your computer and use it in GitHub Desktop.
Save marcelmaatkamp/2d8f063060fb9594c2c9a6d109193cbf to your computer and use it in GitHub Desktop.
cosmppolitan nim compile options
# from https://github.com/Yardanico/cosmonim/blob/master/nim.cfg
--os:linux
# --gc:arc - Not required, but I prefer ARC/ORC over refc for things like this
# Define cosmLibc so we can patch stdlib easier
-d:cosmLibc
--passC:"-Istubs -Icosmopolitan"
--passC:"-static -nostdlib -nostdinc -fno-pie -no-pie -mno-red-zone -include cosmopolitan.h"
--passL:"-Istubs"
--passL:"-static -nostdlib -nostdinc -fno-pie -no-pie -mno-red-zone -fuse-ld=bfd"
--passL:"-Wl,-T,cosmopolitan/ape.lds cosmopolitan/crt.o cosmopolitan/ape.o cosmopolitan/cosmopolitan.a"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment