-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
move tinyc to a separate repo and allow installing external dependencency (eg tinyc) from koch / library code #13850
Conversation
@juancarlospaco this PR doesn't remove tinyc unlike yours, it moves tinyc to an external repository and you still will be able to fetch tinyc with |
const nimRoot = currentSourcePath.parentDir.parentDir | ||
const tinycRoot = nimRoot / tinyPrefix | ||
when not dirExists(tinycRoot): | ||
static: doAssert false, $(tinycRoot, "requires: ./koch installdeps tinyc") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the advantage concretely ?
97c20c2
to
883ab4b
Compare
this PR addresses parts of nim-lang/RFCs#206
move out tinyc
EDIT: but I'm still allowing for tinyc to be re-installed (unlike #11529 which was closed because there was no way to install it back)
allow installing external dependency (eg tinyc etc) to Nim via koch
tools/deps.nim
to make it easy to update external dependency:proc cloneDependency*(destDirBase: string, url: string, commit = commitHead, appendRepoName = true)
which is safe to re-run (for eg with different
commit
)and using it from koch, eg:
this will clone https://github.com/timotheecour/nim-tinyc-archive at Nim/dist/nim-tinyc-archive at a fixed revision (the current git HEAD of that repo, corresponding to latest state of tinyc in nim's repo before this PR)
nim c -d:tinyc compiler/nim.nim
compile again; whether or notcompiler/tccgen.nim
will eventually be removed is out of scope for this PR, at least it currently compiles as of this PR in case someone is curious to revive it (perhaps some code can be reused forzig
as replacement for tinyc (see Add support forzig cc
as C compiler. #13757 and repl for zig ziglang/zig#596). Note that tinyc doesn't work on OSX (https://stackoverflow.com/questions/3712902/problems-compiling-tcc-on-os-x#answer-9590412) and lacks documentation (TinyC is not documented #11495)after this PR