summary refs log tree commit diff stats
path: root/config/nim.cfg
Commit message (Collapse)AuthorAgeFilesLines
* Add compilers and hints to default nim.cfg (#18424)Federico Ceratto2022-02-071-2/+13
|
* let Nim support Nimble 0.14 with lock-file support [backport:1.6] (#19236)Andreas Rumpf2021-12-101-0/+2
|
* Remove tlsEmulation enabled from Windows + GCC config (#19119) [backport:1.6]Ryan Oldenburg2021-11-111-3/+0
| | | This flag has a very significant performance impact on programs compiled with --threads:on. It is also apparently not needed anymore for standard circumstances. Can we remove the config? See https://github.com/nim-lang/Nim/issues/18146#issuecomment-876802676 for discussion and perf impact. [backport:1.6]
* [backport] use old style hints in .cfg files (#18917)Miran2021-09-291-2/+2
| | | refs #18085
* change `--hint[X] => --hint:X` in nim repo (avoids shell quoting issues) ↵Timothee Cour2021-05-261-2/+2
| | | | (#18085)
* config system: special case -d:release and -d:danger [backport:1.4] (#18051)Andreas Rumpf2021-05-201-0/+2
|
* Genode platform fixes (#17521)Emery Hemingway2021-04-091-24/+1
| | | | | | | | | | | | | | | | | | | * Genode: move dyncall failures to runtime Do not use the "error" pragma to warn that dynamic library loading is not implemented, print a message at runtime and exit. * Genode: use stricter dataspace type in page allocator * Genode: remove compiler configuration from nim.cfg Self-hosting Nim is not supported on Genode and defining the cross-compilation environment can be done externally. * Genode: use new mutex API * Genode: call nim_component_construct as a C procedure * Genode: implement echo for NimStringV2
* remove deprecated config (#17269)flywind2021-03-051-2/+0
|
* remove all uses of condsyms symbols defined prior to bootstrap nim 0.20.0 ↵Timothee Cour2021-02-171-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#16918) * nimNoArrayToCstringConversion deadcode * nimbabel deadcode * nimHasalignOf deadcode * nimvarargstyped deadcode * nimhygiene deadcode * nimNewTypedesc deadcode * nimlocks deadcode * nimHasCppDefine deadcode * nimHasRunnableExamples deadcode * nimHasNilChecks deadcode * nimSymKind deadcode * minor macros refactoring * nimVmEqIdent deadcode * nimNoNil deadcode * nimNoZeroTerminator deadcode * nimHasSymOwnerInMacro deadcode * nimVmExportFixed deadcode * nimNewRuntime deadcode * nimAshr deadcode * nimUncheckedArrayTyp deadcode * nimHasTypeof deadcode * nimErrorProcCanHaveBody deadcode * nimHasHotCodeReloading deadcode * nimHasSignatureHashInMacro deadcode * nimHasDefault deadcode * nimMacrosSizealignof deadcode
* fix #16752: threadvar now works with importcpp types; osx now uses native ↵Timothee Cour2021-01-271-3/+5
| | | | | | | | | | | TLS (`--tlsEmulation:off`), which can be orders of magnitude faster (#16750) * osx now uses native TLS, which can be orders of magnitude faster * add {.cppNonPod.} * improve test * changelog, docs, disable part of windows test
* fix config/nim.cfg: `@if not bsd or haiku:` was buggy (#16748)Timothee Cour2021-01-191-10/+8
|
* Change clibdir and cincludes for NetBSD (#15102)Euan2020-07-281-1/+9
|
* Limit number of error messages from gcc/clang backend (#14852)Tomohiro2020-07-071-7/+9
| | | | | | | * Limit number of error messages from backend * Avoid duplication of -fmax-errors * make tests/misc/trunner.nim success
* Clean out oldast (#14837)Juan Carlos2020-06-301-1/+0
| | | | * Clean out old Deprecated CLI switch * Update to remove --oldast CLI option
* Set cincludes and clibdir for FreeBSD, OpenBSD and NetBSD. (#14680)Euan2020-06-161-0/+3
|
* vcc fix (#14222)cooldome2020-05-041-4/+4
| | | Co-authored-by: cooldome <ariabushenko@bk.ru>
* Add LTO support for most compilers and do some VCC fixes (#14013)Keithcat12020-04-221-3/+33
| | | | | | | | | * 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
* #12103 - CI for OpenBSD (#12105)Euan2020-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Working on OpenBSD CI * Condense steps into 2 steps to make output easier to follow. * Move up one directory after csources build. * Remove FreeBSD build manifest and add OpenBSD test ignores for coroutines and hot code reloading. * If runCI fails, run the test results script. * Add email trigger for build failure * Remove .git from repository URL * Disable SFML test on OpenBSD * Disable tgetaddrinfo on OpenBSD as only UDP and TCP protocols are supported. * Remove getFilePermissions as it causes CI test failures with NimScript. * Set clang as cc in nim.cfg and use gmake to build csources. * Add getCurrentDir to nimscript. * Remove duplicate getCurrentDir and check for not weirdTarget. * Add CI badge for OpenBSD. * Disable tests which allocate lots of memory for OpenBSD. * Use `CORO_BACKEND_SETJMP` on OpenBSD rather than ucontext. * Simplify building of koch * Disable t8657 on OpenBSD. See issue #13760. * Fix #12142 - tarray_of_channels fails on OpenBSD * Disable thhtpclient_ssl and tosprocterminate on OpenBSD. These tests can be enabled at a later date after fixing them. * Install libffi. * Set path to libc for openbsd. * Disable tevalffi for now. * Remove tevalffi.nim. * Use ncpuonline sysctl rather than ncpu. * Disable tacceptcloserace and tasynchttpserver on OpenBSD. * Enable tacceptcloserace and tasynchttpserver. * Fix #13775 as suggested by @alaviss - use /bin/cat on OpenBSD rather than /bin/sh. * Enable test on OpenBSD. * Disable tflowvar on OpenBSD.
* use nimEmulateOverflowChecks for ARM/ARM64Araq2020-03-241-0/+4
|
* [backport] -d:danger should imply -d:release (#13336)Miran2020-02-051-0/+1
|
* Fix #10717, fix #13284 (#13307)genotrance2020-02-041-4/+17
|
* Substitute $nimbleDir in --path flags (#12750)genotrance2019-11-281-1/+1
|
* Add /nologo option when nim call cl.exe (#12524)Tomohiro2019-10-271-2/+3
|
* Fix vcc linker option name (#12422)Tomohiro2019-10-181-1/+2
|
* Add no-ident for GCC when -d:release (#12454)Juan Carlos2019-10-181-4/+4
|
* nim.cfg: disable excessiveStackTrace on release (#11575)alaviss2019-06-251-0/+1
|
* make fullpaths the default in error messages and stack traces for mor… ↵Andreas Rumpf2019-06-051-7/+16
| | | | | | | | | | | | (#11385) * make fullpaths the default in error messages and stack traces for more convenient development * split up -d:release into -d:release and -d:danger flags * workaround a Nim config parser bug * fixes an old nim config parser bug * make megatest green again * make nimpretty tests work again * make nimsuggest green
* Genode compiler configuration for arm64 and riscv64 (#11389)ehmry2019-06-031-1/+8
| | | Add compiler for arm64 and riscv64, remove path to compiler binaries.
* switch should be nimOldShiftRight with the nim prefixAraq2019-05-291-1/+1
|
* added a -d:nimv019 define for compiling 0.19 code with 0.20Araq2019-05-291-0/+7
|
* fixes #11306Araq2019-05-241-15/+1
|
* Review of vcc command line arguments (#11003)cooldome2019-04-161-36/+7
| | | | | | | | * fixes #11000 * trigger commit * Trigger build
* Fixes #10387 (#10743)Tomohiro2019-03-041-8/+21
|
* Genode fixes (#10491)Emery Hemingway2019-01-291-1/+4
| | | Readline pasthru, add linker to config, do not pass -lm to linker.
* config/nim.cfg: disable tlsEmulation on Haiku (#10092) [backport]alaviss2018-12-271-3/+0
| | | | As of hrev52662, TLS support in Haiku is usable again. This has since been backported to R1/Beta1, so we can flip the switch upstream.
* Add support for clang-cl (#9977)Neelesh Chandola2018-12-191-0/+5
|
* Fix clang not producing debug info in cpp mode (#9976)Neelesh Chandola2018-12-161-0/+10
| | | | | | * Fix clang on windows to produce debug info * Fix clang not producing debug info in cpp mode
* resolve merge conflictsAraq2018-12-121-20/+29
|\
| * vcvarsallpath explaination no longer needed with vccdiscoverFredrik Høisæther Rasch2017-03-211-29/+0
| | | | | | | | This reverts commit 7c4911d
| * Added explanatory comments about vccexe and its path argument in nim.cfgFredrik Høisæther Rasch2017-03-211-0/+33
| |
| * Added missing VCC C++ options to nim.cfgFredrik Høisæther Rasch2017-03-211-0/+13
| |
* | Make Windows cross-compilation simpler (#9485)genotrance2018-10-241-0/+13
| |
* | Genode fixes (#8501)Emery Hemingway2018-08-161-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | * Genode fixes - wrap strings in "Genode::Cstring" when logging - define SIGABRT for Genode - disable GCC -fstack-protector - use log RPC for fatal messages - add --os:genode build to appveyor - define paramStr and paramCount * Select fixups for Genode POSIX
* | Haiku support for Nim (#8542)alaviss2018-08-141-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * posix_other: Haiku now has spawn.h This is added per https://dev.haiku-os.org/ticket/13446 * posix_other: Add Haiku specific Dirent members * cpuinfo: Add an implementation for Haiku * distros: Add basic Haiku support * encodings: update Haiku support * fenv, math: Haiku now provides libm * times: Add Haiku struct members * ansi_c, osalloc: Add Haiku constants * threads: Add Haiku support * testament: Haiku uses LIBRARY_PATH * nim.cfg: Update Haiku support libnetwork should only be linked if network functions are used * threads: Haiku does not support -pthread switch * tworkingdir: Haiku's env is in /bin * posix_other: add SIGKILLTHR for Haiku * sockets: link with libnetwork on Haiku * coro: correct ucontext.h location http://pubs.opengroup.org/onlinepubs/009696699/basedefs/ucontext.h.html * coro: ucontext backend is not available on Haiku Haiku doesn't provide the <ucontext.h> header, as it was removed from POSIX * coro: fix setjmp backend The compiler does not allow statements after a noreturn function * nativesockets: Haiku doesn't support AI_V4MAPPED * system: hostOS can contains "haiku" * os: add support for Haiku's packagefs packagefs is read-only, but there are writable holes to the underlying file system as well * os: update constant for Haiku
* | Remove cross-platform breaking env var in Nintendo Switch configJoey2018-07-151-4/+4
| | | | | | This was bad to put in here, so my bad. It doesn't work on anything except platforms with shell support. Users can use `--passC` and `--passL` options for customization.
* | Nintendo switch support (#8069)Joey2018-06-271-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add config section for Nintendo Switch * Add compiler configuration for Nintendo Switch and it's CPU * Add specific lib code for Nintendo Switch * Add GC support for Nintendo Switch * Update changelog for Nintendo Switch * Update changelog with more info about fixed paths * Cleaned up GC memory management a bit * Relocate docs for Switch * Rename aarch64NoneElfGcc to nintendoSwitchGCC * Remove armv8a57 * Fix installer.ini * Reuse code in linux and amd64 * Add posix defs for nintendo switch * Add more defined sections for nintendo switch * Remove old comment * Add what's not supported for Nintendo Switch docs * Make nintendoswitch == posix * Remove DEVKITPRO references from nim.cfg * Make PR extccomp changes * Remove Result type alias * Add separate switch consts file * Update docs for nintendo switch * Fix travis errors with undefined consts and add correct wait.h procs
* | Provide configuration for Genode toolchainEmery Hemingway2018-05-181-0/+8
| |
* | Minor fixes to enable tccGanesh Viswanathan2018-05-141-1/+1
| |
* | Change default ARM compiler nameMichał Zieliński2018-01-211-3/+8
| | | | | | In most distros (Ubuntu, Debian, Arch Linux) the only available Linux ARM toolchain uses arm-linux-gnueabihf- prefix. That's also the correct compiler for cross-compiling code for Raspberry Pi, which is what most people will probably want.
* | don't make optNilCheck default to on for now (#7058)jcosborn2018-01-171-0/+3
| | | | | | | | | | | | * don't make optNilCheck default to on for now * add conditional symbol nimHasNilChecks
out; skip_whitespace(in); if (in.peek() == '"') slurp_tangle_string(in, out); else slurp_word(in, out); return out.str(); } void slurp_tangle_string(istream& in, ostream& out) { in.get(); char c; while (in >> c) { if (c == '\\') // only works for double-quotes continue; if (c == '"') break; out << c; } } void slurp_word(istream& in, ostream& out) { char c; while (in >> c) { if (isspace(c) || c == ')') { in.putback(c); break; } out << c; } } void skip_whitespace(istream& in) { while (isspace(in.peek())) in.get(); } list<string>::iterator balancing_curly(list<string>::iterator orig) { list<string>::iterator curr = orig; long open_curlies = 0; do { for (string::iterator p = curr->begin(); p != curr->end(); ++p) { if (*p == '{') ++open_curlies; if (*p == '}') --open_curlies; } ++curr; // no guard so far against unbalanced curly } while (open_curlies != 0); return curr; } // A scenario is one or more sessions separated by calls to CLEAR_TRACE ('===') // A session is one or more lines of input // followed by a return value ('=>') // followed by one or more lines expected in trace in order ('+') // followed by one or more lines trace shouldn't include ('-') // Remember to update is_input below if you add to this format. void emit_test(const string& name, list<string>& lines, list<string>& result) { result.push_back("TEST("+name+")"); while (any_non_input_line(lines)) { if (!any_line_starts_with(lines, "=>")) emit_session(lines, result); // simpler version; no need to check result else emit_result_checking_session(lines, result); if (!lines.empty() && lines.front()[0] == '+') result.push_back(" CHECK_TRACE_CONTENTS(\""+expected_in_trace(lines)+"\");"); while (!lines.empty() && lines.front()[0] == '-') { result.push_back(" CHECK_TRACE_DOESNT_CONTAIN(\""+expected_not_in_trace(lines.front())+"\");"); lines.pop_front(); } if (!lines.empty() && lines.front() == "===") { result.push_back(" CLEAR_TRACE;"); lines.pop_front(); } if (!lines.empty() && lines.front() == "?") { result.push_back(" DUMP(\"\");"); lines.pop_front(); } } result.push_back("}"); while (!lines.empty() && (trim(lines.front()).empty() || starts_with(lines.front(), "//"))) lines.pop_front(); if (!lines.empty()) { cerr << lines.size() << " unprocessed lines in scenario.\n"; exit(1); } } void emit_session(list<string>& lines, list<string>& result) { result.push_back(" "+Toplevel+"(\""+input_lines(lines)+"\");"); } void emit_result_checking_session(list<string>& lines, list<string>& result) { result.push_back("{"); result.push_back(" ostringstream os;"); result.push_back(" TEMP(tmp, "+Toplevel+"(\""+input_lines(lines)+"\"));"); result.push_back(" os << tmp;"); if (!lines.empty() && starts_with(lines.front(), "=>")) { size_t pos = lines.front().find("=>")+2; // length of '=>' result.push_back(" CHECK_EQ(os.str(), \""+trim(string(lines.front(), pos))+"\");"); lines.pop_front(); } result.push_back("}"); } bool is_input(const string& line) { return line != "===" && line[0] != '+' && line[0] != '-' && !starts_with(line, "=>"); } string input_lines(list<string>& hunk) { string result; while (!hunk.empty() && is_input(hunk.front())) { result += hunk.front()+""; // temporary delimiter; replace with escaped newline after escaping other backslashes hunk.pop_front(); } return escape(result); } string expected_in_trace(list<string>& hunk) { string result; while (!hunk.empty() && hunk.front()[0] == '+') { hunk.front().erase(0, 1); result += hunk.front()+""; hunk.pop_front(); } return escape(result); } string expected_not_in_trace(const string& line) { return escape(line.substr(1)); } list<string>::iterator find_substr(list<string>& in, const string& pat) { for (list<string>::iterator p = in.begin(); p != in.end(); ++p) if (p->find(pat) != NOT_FOUND) return p; return in.end(); } list<string>::iterator find_trim(list<string>& in, const string& pat) { for (list<string>::iterator p = in.begin(); p != in.end(); ++p) if (trim(*p) == pat) return p; return in.end(); } string escape(string s) { s = replace_all(s, "\\", "\\\\"); s = replace_all(s, "\"", "\\\""); s = replace_all(s, "", "\\n"); return s; } string replace_all(string s, const string& a, const string& b) { for (size_t pos = s.find(a); pos != NOT_FOUND; pos = s.find(a, pos+b.size())) s = s.replace(pos, a.size(), b); return s; } bool any_line_starts_with(const list<string>& lines, const string& pat) { for (list<string>::const_iterator p = lines.begin(); p != lines.end(); ++p) if (starts_with(*p, pat)) return true; return false; } bool any_non_input_line(const list<string>& lines) { for (list<string>::const_iterator p = lines.begin(); p != lines.end(); ++p) if (!is_input(*p)) return true; return false; } #include <locale> using std::isspace; // unicode-aware // does s start with pat, after skipping whitespace? // pat can't start with whitespace bool starts_with(const string& s, const string& pat) { for (size_t pos = 0; pos < s.size(); ++pos) if (!isspace(s[pos])) return s.compare(pos, pat.size(), pat) == 0; return false; } string indent(const string& s) { for (size_t pos = 0; pos < s.size(); ++pos) if (!isspace(s[pos])) return s.substr(0, pos); return ""; } string strip_indent(const string& s, size_t n) { if (s.empty()) return ""; string::const_iterator curr = s.begin(); while (curr != s.end() && n > 0 && isspace(*curr)) { ++curr; --n; } return string(curr, s.end()); } string trim(const string& s) { string::const_iterator first = s.begin(); while (first != s.end() && isspace(*first)) ++first; if (first == s.end()) return ""; string::const_iterator last = --s.end(); while (last != s.begin() && isspace(*last)) --last; ++last; return string(first, last); } #include<dirent.h> vector<char*> sorted_files(const char* dirname, const char* ext) { vector<char*> result; dirent** files; int num_files = scandir(dirname, &files, NULL, alphasort); for (int i = 0; i < num_files; ++i) { unsigned long n = strlen(files[i]->d_name), extn = strlen(ext); if (n < extn) continue; if (strncmp(&files[i]->d_name[n-extn], ext, extn)) continue; if (!isdigit(files[i]->d_name[0])) continue; char* s = new char[n+1]; strncpy(s, files[i]->d_name, n+1); result.push_back(s); free(files[i]); } free(files); return result; }