move tinyc to a separate repo and allow installing external dependencency (eg tinyc) from koch / library code #13850
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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