mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
Compare commits
3 commits
6e0fd17a72
...
84f68168ed
Author | SHA1 | Date | |
---|---|---|---|
![]() |
84f68168ed | ||
![]() |
2b0af31bf9 | ||
![]() |
e89839c845 |
23 changed files with 34 additions and 27 deletions
2
.github/workflows/bootstrapping_ci.yml
vendored
2
.github/workflows/bootstrapping_ci.yml
vendored
|
@ -34,7 +34,7 @@ jobs:
|
|||
os: [ubuntu-latest, macos-14]
|
||||
fail-fast: false
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
VFLAGS: -no-parallel
|
||||
B_LFLAGS: -lm -lpthread
|
||||
|
|
2
.github/workflows/c2v_ci.yml
vendored
2
.github/workflows/c2v_ci.yml
vendored
|
@ -29,7 +29,7 @@ concurrency:
|
|||
jobs:
|
||||
build-doom:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 20
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Build V
|
||||
|
|
6
.github/workflows/cross_ci.yml
vendored
6
.github/workflows/cross_ci.yml
vendored
|
@ -23,7 +23,7 @@ concurrency:
|
|||
jobs:
|
||||
cross-macos:
|
||||
runs-on: macos-13
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
VFLAGS: -cc clang
|
||||
steps:
|
||||
|
@ -53,7 +53,7 @@ jobs:
|
|||
|
||||
cross-linux:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
VFLAGS: -cc tcc -no-retry-compilation
|
||||
steps:
|
||||
|
@ -102,7 +102,7 @@ jobs:
|
|||
|
||||
cross-windows:
|
||||
runs-on: windows-2025
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Build
|
||||
|
|
4
.github/workflows/docs_ci.yml
vendored
4
.github/workflows/docs_ci.yml
vendored
|
@ -23,7 +23,7 @@ concurrency:
|
|||
jobs:
|
||||
check-markdown:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Build V
|
||||
|
@ -59,7 +59,7 @@ jobs:
|
|||
|
||||
report-missing-dots-in-doc-comments:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Build V
|
||||
|
|
2
.github/workflows/gen_vc_ci.yml
vendored
2
.github/workflows/gen_vc_ci.yml
vendored
|
@ -30,7 +30,7 @@ concurrency:
|
|||
jobs:
|
||||
build-vc:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Build V
|
||||
|
|
2
.github/workflows/gg_regressions_ci.yml
vendored
2
.github/workflows/gg_regressions_ci.yml
vendored
|
@ -23,7 +23,7 @@ concurrency:
|
|||
jobs:
|
||||
gg-regressions:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
VFLAGS: -cc tcc
|
||||
DISPLAY: :99
|
||||
|
|
2
.github/workflows/module_docs_ci.yml
vendored
2
.github/workflows/module_docs_ci.yml
vendored
|
@ -31,7 +31,7 @@ concurrency:
|
|||
jobs:
|
||||
build-module-docs:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Build V
|
||||
|
|
|
@ -26,7 +26,7 @@ jobs:
|
|||
matrix:
|
||||
os: [ubuntu-latest, macos-14, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
|
|
4
.github/workflows/other_ci.yml
vendored
4
.github/workflows/other_ci.yml
vendored
|
@ -67,7 +67,7 @@ jobs:
|
|||
|
||||
code-formatting:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
VFLAGS: -cc gcc
|
||||
steps:
|
||||
|
@ -107,7 +107,7 @@ jobs:
|
|||
|
||||
misc-tooling:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
VFLAGS: -cc tcc -no-retry-compilation
|
||||
steps:
|
||||
|
|
2
.github/workflows/paths_ci.yml
vendored
2
.github/workflows/paths_ci.yml
vendored
|
@ -24,7 +24,7 @@ concurrency:
|
|||
jobs:
|
||||
space-paths-linux:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
|
|
2
.github/workflows/sdl_ci.yml
vendored
2
.github/workflows/sdl_ci.yml
vendored
|
@ -26,7 +26,7 @@ concurrency:
|
|||
jobs:
|
||||
v-compiles-sdl-examples:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
VFLAGS: -cc tcc
|
||||
steps:
|
||||
|
|
2
.github/workflows/toml_ci.yml
vendored
2
.github/workflows/toml_ci.yml
vendored
|
@ -19,7 +19,7 @@ concurrency:
|
|||
jobs:
|
||||
toml-module-pass-external-test-suites:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Build V
|
||||
|
|
2
.github/workflows/tools_ci.yml
vendored
2
.github/workflows/tools_ci.yml
vendored
|
@ -65,7 +65,7 @@ jobs:
|
|||
|
||||
tools-macos:
|
||||
runs-on: macos-14
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
strategy:
|
||||
matrix:
|
||||
cc: [clang]
|
||||
|
|
|
@ -237,7 +237,7 @@ jobs:
|
|||
os: [ubuntu-24.04, macos-14]
|
||||
fail-fast: false
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Build V
|
||||
|
|
2
.github/workflows/vab_ci.yml
vendored
2
.github/workflows/vab_ci.yml
vendored
|
@ -24,7 +24,7 @@ concurrency:
|
|||
jobs:
|
||||
vab-compiles-v-examples:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
VAB_FLAGS: --api 30 --build-tools 29.0.0 -v 3
|
||||
steps:
|
||||
|
|
2
.github/workflows/vinix_ci.yml
vendored
2
.github/workflows/vinix_ci.yml
vendored
|
@ -24,7 +24,7 @@ concurrency:
|
|||
jobs:
|
||||
vinix-build:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Build V
|
||||
|
|
2
.github/workflows/vup_works.yml
vendored
2
.github/workflows/vup_works.yml
vendored
|
@ -37,7 +37,7 @@ jobs:
|
|||
- os: macos-14
|
||||
zip: v_macos_arm64.zip
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
VDIR: /tmp/v_from_release_zip
|
||||
steps:
|
||||
|
|
2
.github/workflows/wasm_backend_ci.yml
vendored
2
.github/workflows/wasm_backend_ci.yml
vendored
|
@ -49,7 +49,7 @@ jobs:
|
|||
matrix:
|
||||
os: [ubuntu-22.04, windows-2022]
|
||||
fail-fast: false
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
VTEST_ONLY: wasm
|
||||
steps:
|
||||
|
|
|
@ -22,7 +22,7 @@ fn main() {
|
|||
fp.skip_executable()
|
||||
fp.limit_free_args_to_at_least(1)!
|
||||
context.show_help = fp.bool('help', `h`, false, 'Show this help screen.')
|
||||
context.timeout = fp.float('timeout', `t`, 600.0, 'Timeout in seconds (for all retries). Default: 600.0 seconds (10 minutes).') * time.second
|
||||
context.timeout = fp.float('timeout', `t`, 900.0, 'Timeout in seconds (for all retries). Default: 900.0 seconds (15 minutes).') * time.second
|
||||
context.delay = fp.float('delay', `d`, 1.0, 'Delay between each retry in seconds. Default: 1.0 second.') * time.second
|
||||
context.retries = fp.int('retries', `r`, 10, 'Maximum number of retries. Default: 10.')
|
||||
if context.show_help {
|
||||
|
|
11
thirdparty/fontstash/fontstash.h
vendored
11
thirdparty/fontstash/fontstash.h
vendored
|
@ -38,6 +38,9 @@ extern "C" {
|
|||
#define FONTSTASH_MALLOC malloc
|
||||
#define FONTSTASH_REALLOC realloc
|
||||
#define FONTSTASH_FREE free
|
||||
// __v_ start
|
||||
#define FONTSTASH_MALLOC_ATOMIC malloc
|
||||
// __v_ end
|
||||
#endif
|
||||
|
||||
enum FONSflags {
|
||||
|
@ -563,7 +566,7 @@ static FONSatlas* fons__allocAtlas(int w, int h, int nnodes)
|
|||
atlas->height = h;
|
||||
|
||||
// Allocate space for skyline nodes
|
||||
atlas->nodes = (FONSatlasNode*)FONTSTASH_MALLOC(sizeof(FONSatlasNode) * nnodes);
|
||||
atlas->nodes = (FONSatlasNode*)FONTSTASH_MALLOC_ATOMIC(sizeof(FONSatlasNode) * nnodes);
|
||||
if (atlas->nodes == NULL) goto error;
|
||||
memset(atlas->nodes, 0, sizeof(FONSatlasNode) * nnodes);
|
||||
atlas->nnodes = 0;
|
||||
|
@ -780,7 +783,7 @@ FONScontext* fonsCreateInternal(FONSparams* params)
|
|||
// Create texture for the cache.
|
||||
stash->itw = 1.0f/stash->params.width;
|
||||
stash->ith = 1.0f/stash->params.height;
|
||||
stash->texData = (unsigned char*)FONTSTASH_MALLOC(stash->params.width * stash->params.height);
|
||||
stash->texData = (unsigned char*)FONTSTASH_MALLOC_ATOMIC(stash->params.width * stash->params.height);
|
||||
if (stash->texData == NULL) goto error;
|
||||
memset(stash->texData, 0, stash->params.width * stash->params.height);
|
||||
|
||||
|
@ -901,7 +904,7 @@ static int fons__allocFont(FONScontext* stash)
|
|||
if (font == NULL) goto error;
|
||||
memset(font, 0, sizeof(FONSfont));
|
||||
|
||||
font->glyphs = (FONSglyph*)FONTSTASH_MALLOC(sizeof(FONSglyph) * FONS_INIT_GLYPHS);
|
||||
font->glyphs = (FONSglyph*)FONTSTASH_MALLOC_ATOMIC(sizeof(FONSglyph) * FONS_INIT_GLYPHS);
|
||||
if (font->glyphs == NULL) goto error;
|
||||
font->cglyphs = FONS_INIT_GLYPHS;
|
||||
font->nglyphs = 0;
|
||||
|
@ -1657,7 +1660,7 @@ FONS_DEF int fonsExpandAtlas(FONScontext* stash, int width, int height)
|
|||
return 0;
|
||||
}
|
||||
// Copy old texture data over.
|
||||
data = (unsigned char*)FONTSTASH_MALLOC(width * height);
|
||||
data = (unsigned char*)FONTSTASH_MALLOC_ATOMIC(width * height);
|
||||
if (data == NULL)
|
||||
return 0;
|
||||
for (i = 0; i < stash->params.height; i++) {
|
||||
|
|
|
@ -8,6 +8,7 @@ $if gcboehm ? {
|
|||
#define FONTSTASH_MALLOC GC_MALLOC
|
||||
#define FONTSTASH_REALLOC GC_REALLOC
|
||||
#define FONTSTASH_FREE GC_FREE
|
||||
#define FONTSTASH_MALLOC_ATOMIC GC_MALLOC_ATOMIC
|
||||
}
|
||||
#include "fontstash.h"
|
||||
#flag darwin -I/usr/local/Cellar/freetype/2.10.2/include/freetype2
|
||||
|
|
|
@ -302,6 +302,7 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) {
|
|||
// have much better performance when NDEBUG is defined
|
||||
// See also http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
|
||||
ccoptions.args << '-DNDEBUG'
|
||||
ccoptions.args << '-DNO_DEBUGGING' // for BDWGC
|
||||
}
|
||||
if v.pref.sanitize {
|
||||
ccoptions.args << '-fsanitize=leak'
|
||||
|
|
|
@ -291,6 +291,7 @@ pub fn (mut v Builder) cc_msvc() {
|
|||
} else {
|
||||
a << '/MD'
|
||||
a << '/DNDEBUG'
|
||||
a << '/DNO_DEBUGGING'
|
||||
if !v.ccoptions.debug_mode {
|
||||
v.pref.cleanup_files << out_name_pdb
|
||||
v.pref.cleanup_files << app_dir_out_name + '.pdb'
|
||||
|
@ -458,6 +459,7 @@ fn (mut v Builder) build_thirdparty_obj_file_with_msvc(_mod string, path string,
|
|||
oargs << '/O2'
|
||||
oargs << '/MD'
|
||||
oargs << '/DNDEBUG'
|
||||
oargs << '/DNO_DEBUGGING'
|
||||
}
|
||||
} else {
|
||||
oargs << '/MDd'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue