ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
arBmind has quit [Quit: Leaving.]
<aiwakura>
hi!
aiwakura has quit [Remote host closed the connection]
aiwakura has joined #zig
aiwakura has quit [Remote host closed the connection]
<GitHub190>
zig/master d686113 Andrew Kelley: fix crash when implicitly casting array of len 0 to slice...
<aiwakura>
andrewrk I'm gonna work on #438
<andrewrk>
nice!
<andrewrk>
aiwakura, I'll be online for about 25 more minutes then I'm headed to bed
<aiwakura>
cool
<aiwakura>
any pointer on where to start?
<andrewrk>
you'll probably want to keep the code in zig_llvm.hpp/cpp which exposes the LLVM enums for targets. But we'll want our own enums in target.hpp on top of that with our own string names
<andrewrk>
and some things you should do with our enums: 1. don't include targets that don't work, shown in that issue. 2. omit darwin; we should use macos and ios instead 3. add zen :D
<aiwakura>
seems straightforward
<aiwakura>
:D
<andrewrk>
aiwakura, you'll also need to change the generated builtin.zig file in codegen.cpp:define_builtin_compile_vars
<andrewrk>
then just make sure we're generating the correct LLVM IR when we cross compile
<andrewrk>
and at that point I think compile errors should lead you toward the rest of the patch
<andrewrk>
aiwakura, make sure target.cpp:get_target_triple is correct
<andrewrk>
that will be changed with #438
<aiwakura>
k
cenomla has quit [Quit: cenomla]
jjido has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jjido has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arBmind has joined #zig
jjido has joined #zig
arBmind has quit [Quit: Leaving.]
arBmind has joined #zig
arBmind has quit [Ping timeout: 265 seconds]
arBmind has joined #zig
jjido has quit [Ping timeout: 240 seconds]
<skyfex_>
andrewrk: I'm going to try to compile the nrf-demo for nRF52 as well (Cortex M4). I'm having some issue there though.
<skyfex_>
zig build-obj --target-os freestanding --target-arch thumb --assembly system\gcc_startup_nrf52.S -isystem include --libc-include-dir include test52.zig LLVM ERROR: Unknown Arch: 19
<skyfex_>
LLVM ERROR: Unknown Arch: 19
<skyfex_>
That's ".arch armv7e-m" in gcc_startup_nrf52.S it's complaining about
<skyfex_>
.arch armv7-m works though
<skyfex_>
OK, I got Zig to run on NRF52/Cortex-M4 :) There's only that armv7e-m issue so far
jjido has joined #zig
arBmind1 has joined #zig
arBmind has quit [Ping timeout: 248 seconds]
jjido has quit [Ping timeout: 264 seconds]
<andrewrk>
skyfex_, thanks for the report
<andrewrk>
I think this is an issue with llvm's assembly parsing