Giving a weird name to a function dosn't work
A test I added to test zebus name handling capabilities, which even after my addition of proper mangling, is failing strangely,
specifically the test run by pytest tests/test_muc/test_simple.py::test_name
which builds the bundle:
.global @-0.a5-1_5 <void>
.const @0 <int<32>> = 0
.funcdef @0-main.func <main_sig>
{
entry(<int<32>>%1.3 <uptr<uptr<char>>>%-):
RET @0
}
And creates an executable called test_name
with the primordial function 0-main.func
.
When trying to compile it produces the following error:
TRACE - Linking boot image...
TRACE - functions: ["0-main.func", "primordial"]
TRACE - extern sources: []
TRACE - output : test_name
TRACE - copying from "/root/mu-impl-fast/src/runtime/main.c" to "emit/main.c"
INFO - output as "emit/test_name"
INFO - link with "emit/0-main.s"
INFO - link with "emit/primordial.s"
INFO - link with "emit/context.s"
INFO - link with "emit/main.c"
INFO - link with "/root/mu-impl-fast/target/release/libmu.a"
INFO - executing: "clang" "-ldl" "-lrt" "-lm" "-lpthread" "emit/0-main.s" "emit/primordial.s" "emit/context.s" "emit/main.c" "/root/mu-impl-fast/target/release/libmu.a" "-rdynamic" "-o" "emit/test_name"
INFO - ---out---
INFO -
INFO - ---err---
INFO - clang-4.0: error: no such file or directory: 'emit/0-main.s'
Where the name 0-main.func
came from is a complete mystery... (it seams to have chopped of the .func
part of the functions name, but why??)