Compare commits

..

3 commits

Author SHA1 Message Date
Delyan Angelov
84f68168ed
v.builder: add -DNO_DEBUGGING in addition to -DNDEBUG, when compiling with -prod
Some checks are pending
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
native backend CI / native-backend-ubuntu (push) Waiting to run
native backend CI / native-backend-windows (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
Sanitized CI / sanitize-undefined-clang (push) Waiting to run
Sanitized CI / sanitize-undefined-gcc (push) Waiting to run
Sanitized CI / tests-sanitize-address-clang (push) Waiting to run
Sanitized CI / sanitize-address-msvc (push) Waiting to run
Sanitized CI / sanitize-address-gcc (push) Waiting to run
Sanitized CI / sanitize-memory-clang (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
wasm backend CI / wasm-backend (ubuntu-22.04) (push) Waiting to run
wasm backend CI / wasm-backend (windows-2022) (push) Waiting to run
Workflow Lint / lint-yml-workflows (push) Waiting to run
2025-09-07 14:32:12 +03:00
Delyan Angelov
2b0af31bf9
ci: bump retry time from 10 to 15 minutes (reduce false positives for slow dependency installations on the CI) 2025-09-07 14:14:47 +03:00
Delyan Angelov
e89839c845
fontstash: define and use FONTSTASH_MALLOC_ATOMIC for the allocated texture and atlas nodes (which do not contain pointers) 2025-09-07 14:05:40 +03:00
23 changed files with 34 additions and 27 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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

View file

@ -65,7 +65,7 @@ jobs:
tools-macos:
runs-on: macos-14
timeout-minutes: 10
timeout-minutes: 15
strategy:
matrix:
cc: [clang]

View file

@ -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

View file

@ -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:

View file

@ -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

View file

@ -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:

View file

@ -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:

View file

@ -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 {

View file

@ -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++) {

View file

@ -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

View file

@ -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'

View file

@ -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'