Odin icon indicating copy to clipboard operation
Odin copied to clipboard

linker: implement `-build-mode:static` on non-windows targets

Open laytan opened this issue 1 year ago • 1 comments

Should either:

  • build an object file that is ready to put in a static library with ar and the likes
  • or also actually call ar and put the one object file in it

laytan avatar Jun 27 '24 17:06 laytan

I built odin compiler on FreeBSD today and tried building demo like this:

./odin build examples/demo -build-mode:static
Internal Compiler Error: TODO(bill): -build-mode:static on non-windows targets

illegal hardware instruction (core dumped)  ./odin build examples/demo -build-mode:static
if (build_context.build_mode == BuildMode_StaticLibrary) {
    compiler_error("TODO(bill): -build-mode:static on non-windows targets");
}

Can -build-mode:static be used with binaries or is it for libraries only?

ngortheone avatar Oct 12 '24 02:10 ngortheone