| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* refactorings in preparation for ropes elimination of the C code generator; mostly the usual ': Rope' -> 'result: var Rope' rewrite
* rewrote ccgcalls.nim
* refactored ccgexprs.nim
* ccgliterals: refactoring
* refactoring: code dealing with name mangling
* refactoring: getRecordFieldsAux
* ropes are strings (insert obscene joke here)
* optimize JS code gen
* optimizations and code improvements
* more optimizations
* final cleanups
|
|
|
|
|
| |
* fix #17351; switch to c++17
* remove workaround
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were doing a very poor job detecting the major version of GCC by
parsing the output of --version.
This patches uses -dumpversion to make this parsing straightforward and
it also fixes a bunch of compiling issues on different platforms with
custom output for --version switches. For example, openSUSE first line
of the output includes the revision number and the parsing that was
being done did mix that number with the major version and breaks
building the nim compiler (as it doesn't find the 3 dots for an X.Y.Z semver
format, hence returning "false").
In this patch, we simply use -dumpversion (which has been at least from
1993, so we are safe :)
|
|
|
|
|
|
|
| |
* replace gcc asm with __asm__ and add a test
* update test case to specify gcc or clang and not cpp
Co-authored-by: daniel <danielclarke@wearepopgun.com>
|
|
|
|
|
|
|
|
|
|
|
| |
* once C++, always C++
When using `{.compile: "file.cc".}` in a nim module, even when compiling
with `nim c` the C++ compiler should be used - once any C++ file has
been compiled, the C++ linker also needs to be used.
* more strict C++ check
* simplify code
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Refactor and doc package handling, module name mangling
* Consolidate, de-duplicate and extend package handling
* Alter how duplicate module names of a package are handled
* Alter how module names are mangled
* Fix crash when another package is named 'stdlib' (test case added)
* Doc what defines a package in the manual
Modules with duplicate names within a package used to be given 'fake'
packages to resolve conflicts. That prevented the ability to discern if
a module belonged to the current project package or a foreign package.
They now have the proper package owner and the names are mangled in a
consistent manner to prevent codegen clashes.
All module names are now mangled the same. Stdlib was treated special
before, but now it is same as any other package. This fixes a crash
when a foreign package is named 'stdlib'.
Module mangling is altered for both file paths and symbols used by the
backends.
Removed an unused module name to package mapping that may have been
intended for IC. The mapping was removed because it wasn't being used
and was complicating the issue of package modules with duplicate names
not having the proper package owner assigned.
* Fix some tests
* Refactor `packagehandling`
* Remove `packagehandling.withPackageName` and its uses
* Move module path mangling from `packagehandling` to `modulepaths`
* Move `options.toRodFile` to `ic` to break import cycle
* Changed import style to match preferred style
Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
extccomp.addExternalFileToCompile() relies on hashes to decide whether
an external C file needs recompilation or not.
Due to short-circuit evaluation of boolean expressions, the procedure
that generates a corresponding hash file is not called the first time an
external file is compiled, so an avoidable recompilation is triggered
the next build.
This patch fixes that by moving the proc call with a desired side
effect from its boolean expression, so it's executed unconditionally.
|
|
|
|
|
|
|
| |
cross-compile/run for windows on osx via wine (#18672)
* --cc:env now works correctly to assign linker executable, allowing using wine on osx
* fixup
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix #18578
* add tests
* tiny
* apply changes
* typo
* add removeStaticFile
|
|
|
|
| |
file invalid (eg due to spec change) (#18197)
|
|
|
|
|
|
| |
* simplify extccomp.nim json logic via jsonutils
* fix #18084
* simplify further
* workaround for bootstrap that can be removed after updating csources_v1 >= 1.2
|
|
|
|
| |
{.link.} pragmas (#17875)
|
|
|
|
|
|
|
|
|
|
|
| |
avoid recompiling when project was previously compiled with such options. (#17829)
* `--usenimcache` (implied by `nim r main`) now caches some compile options
to avoid recompiling when project was previously compiled with such options.
* works
* add test
* changelog
* use std/with
|
|
|
|
|
|
|
|
| |
* CIs: attempt to use csources_v1
* also updated the BSDs
* also updated azure pipelines
* std modules should not itself use the 'std/' import dir...
* compiler has to be careful with std/ for v1 booting
|
| |
|
|
|
| |
Co-authored-by: ee7 <45465154+ee7@users.noreply.github.com>
|
| |
|
| |
|
|
|
|
| |
(#16950)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
tests for `nim secret`, add tests for hintProcessing, misc other bug fixes (#16495)
* fix dots interfering with static:echo
* add tests
* fix hintProcessing dots for hintCC
* improve trunner tests
* fix bug: readLineFromStdin now writes prompt to stdout, consistent with linenoise and rdstdin
* disable a failing test for windows
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* new: `nim -i cmd`
* rename -i to -e (for eval); consistent with majority of other programing languages
* `nim e -e:cmd` now works; bugfix: `echo cmd | nim e -` now works
* honor --betterRun
* address comments
* --eval alias for -e (replaces undocumented --eval which was a noop)
* --eval now defaults to e (nimscript) instead of r
* address comment: remove -e, only keep --eval
* address comment
* fixup
* Update compiler/nimconf.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
| |
* implements https://github.com/nim-lang/RFCs/issues/260
* added a test case
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
hintSuccessX (#14555)
* SuccessX `out` now works with --compileOnly and jsonscript; fix bugs in jsonscript
* several bug fixes; eg: `nim doc lib/system/io` now is sane
* dummy edit to force docs CI
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When --compileOnly is on, extraCmds are not added to JsonBuildInstructions.
```
$ echo 'echo 123'>test.nim
$ nim c --debuginfo --nimcache:cache test
$ ls
cache test test.dSYM test.nim
$ tail -n3 cache/test.json
"extraCmds": ["dsymutil /Users/khronos31/src/tmp/test"],
"stdinInput": false
}
```
```
$ echo 'echo 123'>test.nim
$ nim c --debuginfo --nimcache:cache --compileOnly test
$ nim jsonscript --nimcache:cache test
$ ls
cache test test.nim
$ tail -n3 cache/test.json
"extraCmds": [],
"stdinInput": false
}
```
|
|
|
|
|
| |
* fix some issues with --backend
* fix https://github.com/timotheecour/Nim/issues/175; improve upon #14306
|
|
|
|
|
|
|
|
|
|
| |
`--doccmd:skip` + other improvements (#14278)
* `nim doc --backend:js|cpp...`
`nim doc --doccmd:'-d:foo --threads:on'`
`nim r --backend:cpp...` (implies --run --usenimcache)
* --usenimcache works with all targets
* --docCmd:skip now skips compiling snippets; 50X speedup for doc/manual.rst
|
|
|
|
| |
it works like GCC
|
|
|
|
| |
supported
|
|
|
|
| |
* fixes #14209 [backport:1.2]
* improve stability
|
|
|
| |
Co-authored-by: cooldome <ariabushenko@bk.ru>
|
|
|
|
| |
[backport:1.2]
|
|
|
|
|
|
|
|
|
| |
* Added LTO in nim.cfg, added /link in extccomp.nim and other fixes
* Fix line endings
* Fix line endings, for real this time. Almost certainly. Like, 95% certain.
* Removed /MD from extccom.nim VCC comiler
|
| |
|
|
|
| |
Co-authored-by: cooldome <ariabushenko@bk.ru>
|
|
|
|
|
|
|
|
| |
(#13798)
* fix cgen bool D20200328T203812
* --passc:std=c++17 (etc) now works instead of silently ignored
* document caveats for NIM_NIL
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* config update
* disable a questionable test
* remove c++ exception handling IDs, new impl doesn't require it anymore
* C++ based exceptions finally work
* fixes bootstrapping problem in C++ mode
* teach GCC it's 2020 now
* more bugfixes for C++ based exception handling
* apply cooldome's patch
* another attempt to enable C++11
* bug fix
Co-authored-by: Araq <rumpf_a@web.de>
Co-authored-by: cooldome <ariabushenko@bk.ru>
|
|
|
|
|
|
| |
can show whether it recompiled (#13506)
* fix #13412 nim now recompiles for stdin input; SuccessX now indicates whether it recompiled
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Make listCmd honor hint:cc:off
* Tiny cleanup
* Tiny tiny cleanup
* VERY IMPORTANT: --hint:cc:on will overwrite --verbosity:0 :p
* Tiny cleanup
* Stupid
* Move displayProgressCC to where its required
* Tiny cleanup
|
|
|
|
|
| |
* `koch boot --hint:cc:off` now works
* `koch --nim:pathto/nim boot` now works; code cleanup
|