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