Open kaushalmodi opened 4 years ago
I would recommend just fixing the ifdef switching at the bottom of nimbase.h
with an || defined(__TINYC__)
. Realistically, tcc
is never going to grow all those gcc/clang __builtin_*
s.
yes, please fix nimbase.h instead
@c-blake I tried building nim locally with https://github.com/kaushalmodi/Nim/commit/dba6ec7b69a4472b4324834b2cfd3fe5e6a24cc7, but this issue doesn't get fixed.
Do you want to bring a closure to this issue with a verified PR?
ok.. seeing the diff again, may be I need to put the tinycc outside that wrapped OR condition
I commented on the PR, too. But I think you figured it out.
But I think you figured it out.
Yep :). I also verified that that PR works fine locally.
Works for me with both tcc
and gcc
. Should pass the CI no problem, I'd expect.
Compilations break when compiling with
--cc:tcc
.Example
Current Output
Here is the full
stdlib_io.nim.c
.Expected Output
Possible Solution
tcc.options.always
in nim's defaultnim.cfg
totcc.options.always = "-w -DNIM_EmulateOverflowChecks"
(Credit: @c-blake )Additional Information
tcc
worked just fine earlier, but it probably broke in nim 1.2.0+ (based on its release notes).