#How to emit assembly code when compiling?

1 messages · Page 1 of 1 (latest)

last cairn
#

How can output the assembly file when compiling with zig?
I tried:
zig build run -fstage1 -Drelease-safe=true --emit asm

But seems that --emit option is no more..

olive junco
#

looking at zig build-exe -h theres -femit-asm[=path]

last cairn
#

which version are you using?

olive junco
#

new-ish 0.10

last cairn
#

oh!!

#

what's the difference between zig build and zig build-exe ?!

olive junco
#

build uses build.zig, build-exe just compiles the file you give it into an executable

#

I don't know how emiting asm works with build.zig

last cairn
#

oooh ok, thank you