Commit Graph

196 Commits (36ec47cd203a1f119da74b868ceb92f6da7ea930)

Author SHA1 Message Date
Delyan Angelov 8067fcee57
builder: change the tcc recompilation failed message 2020-12-15 10:47:41 +02:00
ka-weihe 4d025582c0
cgen: fix shadowing warning (#7289) 2020-12-12 23:06:02 +01:00
Delyan Angelov 3386526610
builder: improve support for -g in cross compilation to windows 2020-12-07 23:38:21 +02:00
Delyan Angelov 1914bc790b
builder: add comment about the goal of cflags.c_options_only_object_files() in cross compilation 2020-12-07 20:35:04 +02:00
Delyan Angelov 4b4733d6b4
builder: fix cross compilation of examples from linux->windows 2020-12-07 19:57:12 +02:00
spaceface777 50a3009113
fmt: make single-stmt `or` blocks single-line (#7126) 2020-12-04 13:25:23 +02:00
spaceface777 9345d489f8
ci: fix self compilation with cached modules on macos (#7127) 2020-12-04 13:25:02 +02:00
Delyan Angelov 394e9c4c56
builder: replace single `goto start` usage, with `for { ... continue ... break}` 2020-12-01 22:11:44 +02:00
Delyan Angelov 7511d6e4e8 builder: fix building thirdparty C files with tcc, when run outside vroot 2020-11-30 21:48:21 +02:00
Delyan Angelov ff42572e93 builder: show the C compiler output on -show-c-output, NOT on -showcc 2020-11-30 20:30:47 +02:00
Alexander Medvednikov 376833aea7 builder: show tcc compiler error with -v and -showcc 2020-11-30 17:47:38 +01:00
ka-weihe 9367dcda10
all: fix remaining c warnings and add -Werror to CI (#7021) 2020-11-29 21:23:37 +02:00
spaceface777 4e6bc27b30
compiler: fix self compilation with cached modules on macOS (#7023) 2020-11-29 19:30:35 +01:00
Delyan Angelov adeebad2a6
compiler: use thirdparty/tcc/tcc.exe by default, when no explicit -cc is given (#6598) 2020-11-29 16:18:49 +01:00
Alexander Medvednikov 62ee436944 all: remove broken escape sequences after $ in strings 2020-11-27 03:07:37 +01:00
Delyan Angelov fa126b950a cgen: prevent `undefined symbol: tcc_backtrace` errors with tcc and `-shared -d no_backtrace` 2020-11-25 15:47:55 +02:00
Ekopalypse a46eda7c44
builder: fix dll generation on Windows (#6939) 2020-11-25 12:18:58 +01:00
Delyan Angelov 01579957b8 builder: move -c right before the .c thirdparty file 2020-11-13 20:42:26 +02:00
Delyan Angelov 8cb1714255 builder: fix building sqlite3 on windows 2020-11-13 20:35:21 +02:00
Delyan Angelov 6da8454b3b builder: a small -usecache fix, when v is run in subfolders 2020-11-08 09:18:05 +02:00
Delyan Angelov 4b35495fbe all: support VMODULES environment variable (defaulting to ~/.vmodules) 2020-11-08 08:07:17 +02:00
spaceface777 a9e9554b11
all: fix most C warnings (#6758) 2020-11-06 16:26:59 +02:00
Delyan Angelov 18f5ed671d builder: fix -showcc with msvc 2020-11-03 12:37:04 +02:00
Delyan Angelov 5cb31c2c8f builder: fix support for tcc on windows (openlibm.o) 2020-10-25 03:35:34 +03:00
Delyan Angelov 5f6259dde6 v: add VCACHE support for thirdparty object files and for `v build-module` 2020-10-25 03:09:07 +03:00
Delyan Angelov 8b01146b90 compiler: implement -W and -reuse-tmpc 2020-10-24 20:34:50 +03:00
Delyan Angelov 8f85396a31 builder: use unique .tmp.c and .tmp.c.rsp files, and rm them on successfull non debug builds. 2020-10-24 15:08:45 +03:00
Delyan Angelov 3c2202572b
cgen: produce cleaner error on missing C headers (with optional explanation) (#6637)
Implements support for `#include <openssl/rand.h> # Please install OpenSSL`.
2020-10-17 18:27:06 +03:00
Enzo b083f4014b
fmt: fix multiple things and format most of the compiler (#6631)
Format expressions inside string interpolation like the rest (it used to be a+b instead of a + b, not too sure why)
Fix formatting some match branches when there were only one statement inside (it was inlined)
Fix parsing and formatting some comments edge case on struct field init. You should check out this test because the result is a bit different from before. I personally find it more logical but I would understand if the former format was to stay
Fix formatting of void-returning function signature
2020-10-15 22:12:59 +02:00
Alexander Medvednikov 7da1afa140 all: switch to the new fn arg syntax everywhere; add lots of vfmt -verify tests 2020-10-15 12:32:28 +02:00
Delyan Angelov 3d0f4fd756 backporting: cleanup Makefile, use -std=gnu99 by default, honor CFLAGS and LDFLAGS (CentOS 6.9) 2020-10-07 07:05:59 +00:00
Delyan Angelov dc954bbb03 all: use `macos` consistently in os.user_os and the compiler 2020-09-29 22:32:20 +03:00
Delyan Angelov a9ef7d173f doctor: suggest `v doctor` in issue templates and C builder errors 2020-09-21 18:29:52 +03:00
spaceface777 ff92c3409d
ast: merge `IfExpr` and `CompIf` (#6011) 2020-09-18 00:58:54 +02:00
Pavel Kolesnikov 246fe3bfb7
builder: cc_linux_cross() fixes (#6287) 2020-09-05 01:35:35 +02:00
Pavel Kolesnikov a3ee217537
builder: use tar instead of unzip in cc_linux_cross() (#6286) 2020-09-02 10:09:06 +02:00
Delyan Angelov 88f75fc1d6 builder: cleanup cc.v; log build_thirdparty_obj_files with `-v` 2020-08-28 09:38:52 +03:00
Delyan Angelov 995a5fed1f v.builder: add -DNDEBUG for non debug -prod builds (affects sokol performance) 2020-08-24 23:10:22 +03:00
Delyan Angelov fc7a108366 v.builder: fix quoting when building thirdparty source files 2020-08-16 10:18:14 +03:00
joe-conigliaro 1ea511b530
builder/cgen: get -usecache working for self cimpilation 2020-07-31 20:10:19 +10:00
Delyan Angelov 2c45e601ef builder: increase backtrace size with tcc to 25 frames 2020-07-30 16:56:58 +03:00
Alexander Medvednikov 280afb2282 builder: rename `a` to `args` 2020-07-28 22:33:33 +02:00
Leah Lundqvist 51c9b49d3f
iOS: basic building and running (#5999) 2020-07-28 22:27:38 +02:00
Delyan Angelov c1e14b451e builder: show timing info in bold; also add a `checker summary:` line with -stats 2020-07-25 10:32:29 +03:00
Alexander Medvednikov 3c1427a4e8 all: fix current module in build-module mode 2020-07-25 01:37:54 +02:00
pancake 04ef2a2671
os: implement os.system for iOS and uncomment the `$if ios` blocks (#5947) 2020-07-24 10:17:32 +03:00
Alexander Medvednikov 632e27a4a9 all: fix a big mutability bug and update all mutable vars 2020-07-23 23:16:36 +02:00
Alexander Medvednikov 653d40bfe8 parser: do not duplicate table imports 2020-07-23 21:59:48 +02:00
pancake 36352085ae
v: add support for iOS crosscompilation (#5943) 2020-07-23 07:58:44 +03:00
Alexander Medvednikov 38e5569503 all: cached modules fixes 2020-07-18 11:15:44 +02:00
Alexander Medvednikov dc89a914ea cc: build-module/module cache fixes; strconv: move all code in one module 2020-07-16 19:01:56 +02:00
Delyan Angelov 1873a0cb6d builder: pass -g3 for -cg 2020-07-15 12:46:24 +03:00
Delyan Angelov e23925f2be pref: add -show-timings option 2020-07-14 18:47:40 +03:00
Delyan Angelov f1fdafcdff pref: add -check-syntax for just parsing files, without checking them 2020-07-12 22:44:38 +03:00
Delyan Angelov 75b7b9564a builder: show the contents of the C .rsp file on -showcc 2020-07-10 13:07:20 +03:00
Alexander Medvednikov 9511b7d0a1 cc: do not use -ldl in cross compiling for now 2020-07-09 12:29:49 +02:00
Alexander Medvednikov 8c338a7c3b cc: format and fix linuxroot download 2020-07-09 12:26:15 +02:00
Emily Hudson 3b0dfd9ae1
cc: use @response files to avoid command line length limits (#5750) 2020-07-08 15:50:17 +03:00
Emily Hudson cdfb578565
builder: cache msvc (#5733) 2020-07-07 20:35:49 +02:00
Delyan Angelov 25771a1afe compiler: remove -keepc option (it is now always on) 2020-07-06 13:42:18 +03:00
Alexander Medvednikov 076d0208cd cc: add -ldl and .o in cross builds 2020-06-23 12:57:06 +02:00
Alexander Medvednikov 011e26ca9a checker: check sum types in `match`; cross compilation fixes; orm fixes 2020-06-21 23:09:53 +02:00
spaceface777 624005bbd0
tcc_win: fix tests 2020-06-19 12:54:56 +02:00
Alexander Medvednikov 1d28d45c5c builder: add -lpthread; x64: a+b, a-b 2020-06-18 14:14:42 +02:00
Delyan Angelov cadde3e9f0 vlib: fix os.exec().output usages, that may rely on trimmed lines 2020-06-15 15:38:20 +03:00
Alexander Medvednikov 45a3d8474e cc: remove sysroot hack now that $ bug is fixed 2020-06-13 22:54:20 +02:00
Alexander Medvednikov 183924e2a8 cc: linux cross compilation fixes + make work with openssl 2020-06-13 16:19:19 +02:00
Alexander Medvednikov 1254d7a302 cc: fix windows cross compiling for programs that use json 2020-06-10 17:15:24 +02:00
Delyan Angelov 8a16086084 builder: pass -bt10 for tcc (phase 1 for using tcc_backtrace) 2020-06-08 10:40:01 +03:00
Alexander Medvednikov a5ddb613fb builder: linux cross compilation 2020-05-31 15:09:07 +02:00
Delyan Angelov f9cb0d443b builder: improve suggestion on a w64 cross compile fail on linux 2020-05-30 13:49:03 +03:00
Delyan Angelov d148920b54 v.util: prepare CI for the external markdown module (needed for vdoc) 2020-05-30 11:06:16 +03:00
pancake b3f2c629c6
builder: use .dylib for -shared builds in macOS 2020-05-29 04:52:19 +02:00
Uwe Krüger 2635be511f
all: re-apply C++ support 2020-05-18 21:38:06 +02:00
Alexander Medvednikov 07a78b2843 Revert "all: C++ compiler support"
This reverts commit 9a237c3e82.
2020-05-18 17:05:48 +02:00
Uwe Krüger 9a237c3e82
all: C++ compiler support 2020-05-18 15:51:36 +02:00
Delyan Angelov 53ffee1e02 compiler: respect -showcc, -prod, -cg, when cross compiling for windows 2020-05-18 12:11:26 +03:00
Alexander Medvednikov f49ef39708 checker: handle unexpected `or` blocks 2020-05-14 18:19:40 +02:00
Alexander Medvednikov e5d4786371 builder: simplify C error message 2020-05-14 18:14:38 +02:00
Alexander Medvednikov 1cb4aa7642 builder: cross compiling for linux, part 1 2020-05-14 04:15:04 +02:00
Alexander Medvednikov e60e8f3b34 builder: bring back cross compilation for windows 2020-05-13 23:02:31 +02:00
Delyan Angelov e08566d571 compiler: do not exit early, when given -o x.c or -o x.js 2020-05-08 15:31:03 +03:00
Delyan Angelov dbbfb04e7c docs: change obsolete -show_c_cmd to -showcc and -keepc 2020-05-02 19:01:53 +03:00
Delyan Angelov 7038f59ca5 compiler: add back support for -live 2020-05-02 01:14:44 +03:00
Alexander Medvednikov 1e4e882bc2 cc/cgen: cached modules fixes 2020-04-28 13:15:37 +02:00
Alexander Medvednikov eb8973c362 builder: module caching fixes 2020-04-27 14:46:25 +02:00
Alexander Medvednikov f005079e0b pref: rename keep_c 2020-04-27 13:28:00 +02:00
Enzo Baldisserri fb54a2635c
fmt: lots of fixes 2020-04-25 17:49:16 +02:00
Kris Cherven 155891a4e0
parser: add unused variable warning 2020-04-22 01:52:56 +02:00
Tim Basel 86df486988
compiler: rename is_so to is_shared 2020-04-18 17:46:23 +02:00
Kris Cherven 3cc7009440
cflag: remove circular dependency 2020-04-18 16:29:43 +02:00
Delyan Angelov 30714d16d9 c linker: pass -Xlinker -z -Xlinker muldefs only on Linux with -cache 2020-04-11 15:24:23 +03:00
Delyan Angelov ba799b3f85 builder: support v.mod/@VROOT, fix -cflags and -cache 2020-04-11 09:57:31 +03:00
Alexander Medvednikov f76931c01e cache builtin modules 2020-04-10 18:11:43 +02:00
Alexander Medvednikov f3c917e0aa fmt: fix array receivers; cmd/v: -showcc 2020-04-09 15:05:06 +02:00
Alexander Medvednikov 8d150d427a merge and simplify cmd/v and v.builder 2020-04-07 00:44:31 +02:00